Changes between Version 1 and Version 2 of TracPlugins
- Timestamp:
- Sep 4, 2005, 10:49:38 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracPlugins
v1 v2 1 = Trac Plugin Installation Guide=1 = Trac Plugins = 2 2 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].3 Since 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]. 4 4 5 5 == Requirements == 6 6 7 To plugins in Trac, the following software packages must be installed:7 To use plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version 0.5a13 installed. 8 8 9 * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.5a13 for using plugins 10 9 To 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 }}} 11 13 12 14 == Installing a Trac Plugin == 13 15 14 As example we use the TracWebAdmin plugin. 16 Plugins 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 }}} 20 to build the `.egg` file. 15 21 16 === Step 1. downloading TracWebAdmin === 22 Once 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. 17 23 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 == 22 25 23 === Step 2. build the plugin === 26 Some 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. 24 27 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 28 To do this from the Apache configuration, use the `SetEnv` directive as follows: 52 29 {{{ 53 30 SetEnv PYTHON_EGG_CACHE /path/to/dir 54 31 }}} 55 32 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 }}} 33 This 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. 62 34 63 35 ----