Edgewall Software

Changes between Version 36 and Version 37 of TracDev/DevelopmentEnvironmentSetup


Ignore:
Timestamp:
Jan 28, 2015, 12:09:07 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/DevelopmentEnvironmentSetup

    v36 v37  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = Developer setup for Trac =
     2= Developer setup for Trac
    33
    4 == Where to go for more information ==
    5 It is also a good idea to review a couple of documents before attempting to install a development environment or even to install from the trunk.  One such place
    6 (currently) is to review the [/roadmap milestones] page(s) to see if there are any specific requirements for the version you are setting up. 
     4== Where to go for more information
    75
    8 Specifically, for version 0.12 and later, you need to use Genshi 0.6 or later. See milestone:0.12 for more information.
     6Review a couple of documents before attempting to install a development environment or even to install from the trunk. One such place is the [/roadmap milestones] pages to see if there are any specific requirements for the version you are setting up. 
     7
     8Specifically, for Trac 0.12+, you need Genshi 0.6 or later. See milestone:0.12 for more information.
    99
    1010The (automated) tests will require additional packages that may or may not be installed with your OS/Python distribution. 
     
    1212 *  For the functional test, please review [../FunctionalTests]
    1313
    14 == Installing the development tools ==
    15 Before we begin to develop in Trac, or even download Trac code, first create a standalone environment.
     14== Installing the development tools
    1615
    17 === Create a working directory ===
    18 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:
     16Before we begin to develop in Trac, or even download Trac code, create a standalone environment.
     17
     18=== Create a working directory
     19
     20Create a projects or working directory for your development efforts. So for example on some systems, you might have:
    1921{{{
    2022/Users/myname/projects
    2123}}}
    22 On Windows I would have:
     24On Windows you would have:
    2325{{{
    24 c:\projects
     26C:\projects
    2527}}}
    2628
    27 '''Note:''' I don't create a directory called 'trac' yet. That comes later!  In the meantime, `cd` (change directory) into your projects directory.
     29'''Note:''' Don't create a directory called 'trac' yet. That comes later.
    2830
    29 === Get Subversion ===
    30 This tutorial assumes you have SVN installed.  If you don't have SVN installed please go to the [http://subversion.apache.org/ Subversion] website and follow the directions of installation there.
     31=== Get Subversion
    3132
    32 === Get Python ===
     33This tutorial assumes you have Subversion (SVN) installed. If not, go to the [http://subversion.apache.org/ Subversion] website and follow the directions of installation there.
    3334
    34 On Linux, in most cases it is best to install Python using the package manager for your distribution. For example, on a distribution utilizing the Apt package manager (Debian, Ubuntu):
     35=== Get Python
     36
     37On Linux, it is in most cases best to install Python using the package manager for your distribution. For example, on a distribution utilizing the Apt package manager (Debian, Ubuntu):
    3538{{{
    3639sudo apt-get install python2.6
     
    4447On Windows, some of the available options are:
    4548 * The official Python distribution from [http://www.python.org/download/ python.org].
    46  * ActiveState [http://www.activestate.com/activepython/ ActivePython]
     49 * The commercial [http://www.activestate.com/activepython/ ActivePython] from ActiveState.
    4750
    4851Mac OS X 10.5 and later has Python >= 2.5 pre-installed.
    4952
    50 === Get easy_install ===
    51 You may already have `easy_install` if you have "setuptools" installed. Just make sure its version is >= 0.6c10. Previous versions do not work correctly with SVN 1.6.
     53=== Get easy_install
    5254
    53 Otherwise go 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] (for Python 2.4 and 2.5 read Section [https://pypi.python.org/pypi/setuptools#python-2-4-and-python-2-5-support Python 2.4 and Python 2.5 support]), save it as `ez_setup.py` on your hard drive, then from the command-line prompt type:
     55You will have `easy_install` if you have "setuptools" installed. Just make sure its version is >= 0.6c10. Previous versions do not work correctly with SVN 1.6.
     56
     57Otherwise go 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]. For Python 2.4 and 2.5 read Section [https://pypi.python.org/pypi/setuptools#python-2-4-and-python-2-5-support Python 2.4 and Python 2.5 support], save it as `ez_setup.py` on your hard drive, then from the command-line prompt type:
    5458{{{
    5559python ez_setup.py
    5660}}}
    5761
    58 To test if the installation was successful, try typing from command-line prompt:
     62To test if the installation was successful:
    5963{{{
    6064easy_install --help
    6165}}}
    6266
    63 === Get virtualenv ===
     67=== Get virtualenv
     68
    6469From the command-line prompt type:
    6570{{{
     
    6873On Linux you may need to prepend `python` with `sudo`.
    6974
    70 === Set up a virtual environment ===
     75=== Set up a virtual environment
     76
    7177From the command-line prompt type:
    7278{{{
     
    8288}}}
    8389
    84 If you have Trac installed in `/usr/lib` or `/usr/local/lib`, make sure to run the above virtualenv command with `--no-site-packages`.
     90If you have Trac installed in `/usr/lib` or `/usr/local/lib`, run the above virtualenv command with `--no-site-packages`.
    8591
    8692You'll see your command-line prompt has changed.  That means our environment is ready for Trac.
    8793
    88 === Upgrade Setuptools ===
    89 Just to be sure you have a recent enough version of setuptools, and if not you should try to upgrade them (this was necessary on Ubuntu 10.04 Beta). For more options on upgrading packages with `easy_install` see [http://peak.telecommunity.com/DevCenter/EasyInstall#upgrading-a-package upgrading a package].
     94=== Upgrade Setuptools
     95
     96Just to be sure you have a recent enough version of setuptools, and if not, you should upgrade them. For more options on upgrading packages with `easy_install` see [http://peak.telecommunity.com/DevCenter/EasyInstall#upgrading-a-package upgrading a package]:
    9097{{{
    9198easy_install --upgrade setuptools
    9299}}}
    93100
    94 == Developing with Eclipse and !PyDev ==
    95 If you planning to develop using Eclipse you should also read the [TracDev/DevelopmentWithEclipseAndPyDev Development with Eclipse and PyDev] page, after installing and configuring Trac in the next section.
     101== Developing with Eclipse and !PyDev
    96102
    97 == Installing and configuring Trac ==
     103If you are planning to develop using Eclipse, you should also read the [TracDev/DevelopmentWithEclipseAndPyDev Development with Eclipse and PyDev] page, after installing and configuring Trac in the next section.
     104
     105== Installing and configuring Trac
    98106 
    99 === Downloading Trac ===
     107=== Downloading Trac
    100108
    101 You should get the Trac source code from one of the TracRepositories.
    102 
    103 For example, for Subversion (from the command-line prompt):
     109You should get the Trac source code from one of the TracRepositories. For example, for Subversion from the command-line prompt:
    104110{{{
    105111svn co http://svn.edgewall.org/repos/trac/trunk/ trac-trunk
     
    112118}}}
    113119
    114 === Creating your test Trac environment ===
     120=== Creating your test Trac environment
     121
    115122From the command-line prompt:
    116123{{{
     
    119126'''Note:''' Press return for every option.
    120127
    121 === Make anonymous users have full access ===
     128=== Make anonymous users have full access
     129
    122130{{{
    123131trac-admin test permission add anonymous TRAC_ADMIN
     
    125133'''Note:''' Don't do this in production!
    126134
    127 === Installing the [th:TracDeveloperPlugin] (optional) ===
     135=== Installing the [th:TracDeveloperPlugin] (optional)
     136
    128137From the command-line prompt:
    129138{{{
     
    135144}}}
    136145
    137 === Starting trac in development mode ===
     146=== Starting trac in development mode
    138147
    139148From the command-line prompt:
     
    150159}}}
    151160
    152 === Debugging Plugins ===
     161=== Debugging Plugins
     162
    153163To debug a plugin, install it into your test environment using the command:
    154164 {{{
     
    157167If you are experiencing troubles in debugging Trac code, make sure that `PYTHONPATH` in project properties doesn't contain pointers to other Trac sources. Otherwise those sources will be picked instead of the checked out sources.
    158168
    159 === Web stuff ===
    160 Switch to your browser and go to this URL:
     169=== Web stuff
    161170
    162 http://127.0.0.1:8000/test
     171Switch to your browser and go to `http://127.0.0.1:8000/test`
    163172
    164 Now lets follow a few more steps
    165 
     173Now do the following:
    166174 * Go to web admin
    167  * Hit the admin link
    168  * Logging
     175 * Click on Admin
     176 * Set logging:
    169177  - Set type to `console`
    170178  - Set level to `debug`
    171179
    172 === Alternative frontends ===
     180=== Alternative frontends
     181
    173182To develop on Trac with Apache rather than the standalone `tracd`, see the [TracDev/AlternativeFrontends alternative frontends] page for information on using Apache with mod_python and mod_wsgi.