Edgewall Software

Changes between Initial Version and Version 1 of TracDev/DevelopmentEnvironmentSetup


Ignore:
Timestamp:
Mar 17, 2008, 12:47:46 AM (16 years ago)
Author:
Daniel Greenfeld <pydanny@…>
Comment:

Not yet tested!

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/DevelopmentEnvironmentSetup

    v1 v1  
     1= Developer setup for Trac =
     2This tutorial assumes you have SVN installed.  If you don't please go to the [http://subversion.tigris.org/ Subversion] website and follow the directions of installation there.
     3
     4== Setting up the environment ==
     5Before we begin to develop in Trac, or even download Trac code, lets create a standalone environment.
     6
     7=== Create a working directory ===
     8No matter my operating system, I like to create a projects or working directory for my development efforts.  So for example on some systems, I might have:
     9{{{
     10/Users/myname/projects
     11}}}
     12On Windows I would have:
     13{{{
     14c:\projects
     15}}}
     16
     17'''Note:''' I don't create a directory called 'trac' yet. That comes later!  In the meantime, cd (change directory) to your projects directory.
     18
     19=== Get easy_install ===
     20Go to [http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install installing-easy-install] and follow the instructions there.  However, most of the time you just take the text at [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py], save it as ez_setup.py on your hard drive, then from the command-line prompt type:
     21{{{
     22python ez_setup.py
     23}}}
     24
     25=== Get virtual env ===
     26From the command-line prompt type:
     27{{{
     28easy_install virtualenv
     29}}}
     30
     31=== Set up a virtual environment ===
     32From the command-line prompt type:
     33{{{
     34virtualenv trac
     35cd trac
     36source bin/activate
     37}}}
     38
     39You'll see your command-line prompt has changed.  That means our environment is ready for Trac.
     40 
     41=== Downloading trac ===
     42From the command-line prompt:
     43{{{
     44svn co http://svn.edgewall.org/repos/trac/trunk/ trac-trunk
     45svn co http://svn.edgewall.org/repos/genshi/trunk/ genshi-trunk
     46cd trac-trunk
     47python setup.py develop
     48cd ../genshi-trunk
     49python setup.py develop
     50cd ..
     51}}}
     52
     53=== Creating your test trac environment ===
     54From the command-line prompt:
     55{{{
     56trac-admin test initenv
     57... abount installation
     58trac-admin test permission add anonymous TRAC_ADMIN
     59}}}
     60
     61=== Installing the trackdeveloperplugin ===
     62From the command-line prompt:
     63{{{
     64svn co http://trac-hacks.org/svn/tracdeveloperplugin/trunk/ tracdeveloperplugin
     65cd tracdeveloperplugin
     66python setup.py bdist_egg
     67cp dist/*.egg ../test/plugins
     68cd ..
     69}}}
     70
     71=== Starting trac in development mode ===
     72From the command-line prompt:
     73{{{
     74tracd -r --port 8000 test
     75}}}
     76
     77'''note''': The -r command puts Trac into refresh mode so your code changes will show up quickly.
     78
     79
     80
     81=== Web stuff ===
     82Switch to your browser and go to this URL:
     83
     84http://127.0.0.1:8000/test
     85
     86Now lets follow a few more steps
     87
     88 * Go to web admin
     89 * Hit the admin link
     90 * Logging
     91  - Set type to console
     92  - level to debug