Edgewall Software

Changes between Version 1 and Version 2 of TracPlugins


Ignore:
Timestamp:
Sep 4, 2005, 10:49:38 PM (19 years ago)
Author:
Christopher Lenz
Comment:

Cleanup

Legend:

Unmodified
Added
Removed
Modified
  • TracPlugins

    v1 v2  
    1 = Trac Plugin Installation Guide =
     1= Trac Plugins =
    22
    3 Trac [milestone:0.9 0.9] and later supports plugins that extend the builtin functionality. The plugin functionality is based on the [wiki:TracDev/ComponentArchitecture component architecture].
     3Since version 0.9, Trac supports plugins that extend the built-in functionality. The plugin functionality is based on the [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture component architecture].
    44
    55== Requirements ==
    66
    7 To plugins in Trac, the following software packages must be installed:
     7To use plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version 0.5a13 installed.
    88
    9  * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.5a13 for using plugins
    10 
     9To install `setuptools`, download the bootstrap module [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] and execute it as follows:
     10{{{
     11$ python ez_setup.py setuptools==0.5a13
     12}}}
    1113
    1214== Installing a Trac Plugin ==
    1315
    14 As example we use the TracWebAdmin plugin.
     16Plugins are packaged as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs]. That means they are ZIP archives with the file extension `.egg`. If you have downloaded a source distribution of a plugin, you can run:
     17{{{
     18$ setup.py bdist_egg
     19}}}
     20to build the `.egg` file.
    1521
    16 === Step 1. downloading TracWebAdmin ===
     22Once you have the plugin archive, you need to copy it into the `plugins` directory of the [wiki:TracEnvironment project environment]. Also, make sure that the web server has sufficient permissions to read the plugin egg.
    1723
    18 Checkout the lastes version:
    19 {{{
    20 $ svn co http://svn.edgewall.com/repos/trac/branches/jonas-dev/webadmin webadmin
    21 }}}
     24== Setting up the Plugin Cache ==
    2225
    23 === Step 2. build the plugin ===
     26Some plugins will need to be extracted by the Python eggs runtime (`pkg_resources`), so that their contents are actual files on the file system. The directory in which they are extracted defaults to the home directory of the current user, which may or may not be a problem. You can however override the default location using the `PYTHON_EGG_CACHE` environment variable.
    2427
    25 Build the Trac Plugin by running the following command at the top of the source directory
    26 {{{
    27 $ python ./setup.py bdist_egg clean
    28 }}}
    29 
    30 === Step 3. copy the Plugin into your Trac Environment Plugin Directory ===
    31 
    32 {{{
    33 $ cp ./dist/TracWebAdmin-0.1.egg /path/to/projectenv/plugins/
    34 }}}
    35 
    36 ''Note: The user account under which the web server runs will require read permissions to the environment plugin directory and all the files inside.''
    37 
    38 === Step 4. configure your Trac plugin ===
    39 
    40 Please consult the documentation of each plugin for further configuration.[[BR]]
    41 For TracWebAdmin you need to login as an user with TRAC_ADMIN rights.
    42 
    43 ''Enjoy!''
    44 
    45 == Troubleshooting ==
    46 
    47 '''Setting up plugin cache directory'''
    48 
    49 Plugins need a cache directory, the user account under which the web server runs will require write permissions to that directory.
    50 
    51 Put the following in your httpd.conf in the <Location> block
     28To do this from the Apache configuration, use the `SetEnv` directive as follows:
    5229{{{
    5330SetEnv PYTHON_EGG_CACHE /path/to/dir
    5431}}}
    5532
    56 '''installing [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.5a13 '''
    57 
    58 Install Setup-Tools by running the following command at the top of the plugin source directory
    59 {{{
    60 python ez_setup/__init__.py
    61 }}}
     33This works whether your using the [wiki:TracCgi CGI] or the [wiki:TracModPython mod_python] front-end. For [wiki:TracFastCgi FastCGI], you'll need to `-initial-env` option, or whatever is provided by your web server for setting environment variables.
    6234
    6335----