Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Changes between Version 1 and Version 2 of TracPlugins

Author:
trac (IP: 0.0.0.0)
Timestamp:
12/29/05 18:50:51 (11 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracPlugins

    v1 v2  
    11= Trac Plugins = 
     2[[TracGuideToc]] 
    23 
    34Since 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]. 
    56== Requirements == 
    67 
    7 To use plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version 0.5a13 installed. 
     8To use plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools] (version 0.6) installed. 
    89 
    910To install `setuptools`, download the bootstrap module [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] and execute it as follows: 
    1011{{{ 
    11 $ python ez_setup.py setuptools==0.5a13 
     12$ python ez_setup.py 
    1213}}} 
     14 
     15If the `ez_setup.py` script fails to install the setuptools release, you can download it from [http://www.python.org/pypi/setuptools PyPI] and install it manually. 
    1316 
    1417== Installing a Trac Plugin == 
    1518 
     19=== For a Single Project === 
     20 
    1621Plugins 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: 
    1722{{{ 
    18 $ setup.py bdist_egg 
     23$ python setup.py bdist_egg 
    1924}}} 
    2025to build the `.egg` file. 
    2126 
    2227Once 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. 
     28 
     29=== For All Projects === 
     30 
     31Plugins that you want to use in all your projects (such as [http://projects.edgewall.com/trac/wiki/WebAdmin WebAdmin]) can be installed globally by running: 
     32{{{ 
     33$ python setup.py install 
     34}}} 
     35 
     36Alternatively, you can just drop the `.egg` file in the Python `site-packages` directory. 
     37 
     38Unlike plugins installed per-environment, you'll have to explicitly enable globally installed plugins via [wiki:TracIni trac.ini]. This is done in the `[components]` section of the configuration file, for example: 
     39{{{ 
     40[components] 
     41webadmin.* = enabled 
     42}}} 
     43 
     44The name of the option is the Python package of the plugin. This should be specified in the documentation of the Plugin, but can also be easily find out by looking at the source (look for a top-level directory that contains a file named `__init__.py`.) 
    2345 
    2446== Setting up the Plugin Cache == 
    3153}}} 
    3254 
    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. 
     55This works whether your using the [wiki:TracCgi CGI] or the [wiki:TracModPython mod_python] front-end. Put this directive next to where you set the path to the [wiki:TracEnvironment Trac environment], i.e. in the same `<Location>` block. 
     56 
     57For example (for CGI): 
     58{{{ 
     59 <Location /trac> 
     60   SetEnv TRAC_ENV /path/to/projenv 
     61   SetEnv PYTHON_EGG_CACHE /path/to/dir 
     62 </Location> 
     63}}} 
     64 
     65or (for mod_python): 
     66{{{ 
     67 <Location /trac> 
     68   SetHandler mod_python 
     69   ... 
     70   SetEnv PYTHON_EGG_CACHE /path/to/dir 
     71 </Location> 
     72}}} 
     73 
     74For [wiki:TracFastCgi FastCGI], you'll need to `-initial-env` option, or whatever is provided by your web server for setting environment variables. 
    3475 
    3576---- 
    36 See also TracGuide, [wiki:TracDev/ComponentArchitecture component architecture] 
     77See also TracGuide, [http://projects.edgewall.com/trac/wiki/PluginList plugin list], [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture component architecture]