Edgewall Software

Version 1 (modified by Daniel Greenfeld <pydanny@…>, 16 years ago) ( diff )

Not yet tested!

Developer setup for Trac

This tutorial assumes you have SVN installed. If you don't please go to the Subversion website and follow the directions of installation there.

Setting up the environment

Before we begin to develop in Trac, or even download Trac code, lets create a standalone environment.

Create a working directory

No 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:

/Users/myname/projects

On Windows I would have:

c:\projects

Note: I don't create a directory called 'trac' yet. That comes later! In the meantime, cd (change directory) to your projects directory.

Get easy_install

Go to installing-easy-install and follow the instructions there. However, most of the time you just take the text at ez_setup.py, save it as ez_setup.py on your hard drive, then from the command-line prompt type:

python ez_setup.py

Get virtual env

From the command-line prompt type:

easy_install virtualenv

Set up a virtual environment

From the command-line prompt type:

virtualenv trac
cd trac
source bin/activate

You'll see your command-line prompt has changed. That means our environment is ready for Trac.

Downloading trac

From the command-line prompt:

svn co http://svn.edgewall.org/repos/trac/trunk/ trac-trunk
svn co http://svn.edgewall.org/repos/genshi/trunk/ genshi-trunk
cd trac-trunk
python setup.py develop 
cd ../genshi-trunk
python setup.py develop
cd ..

Creating your test trac environment

From the command-line prompt:

trac-admin test initenv
... abount installation
trac-admin test permission add anonymous TRAC_ADMIN

Installing the trackdeveloperplugin

From the command-line prompt:

svn co http://trac-hacks.org/svn/tracdeveloperplugin/trunk/ tracdeveloperplugin
cd tracdeveloperplugin
python setup.py bdist_egg
cp dist/*.egg ../test/plugins
cd ..

Starting trac in development mode

From the command-line prompt:

tracd -r --port 8000 test

note: The -r command puts Trac into refresh mode so your code changes will show up quickly.

Web stuff

Switch to your browser and go to this URL:

http://127.0.0.1:8000/test

Now lets follow a few more steps

  • Go to web admin
  • Hit the admin link
  • Logging
    • Set type to console
    • level to debug
Note: See TracWiki for help on using the wiki.