Edgewall Software

Changes between Version 80 and Version 81 of TracPlugins


Ignore:
Timestamp:
Mar 18, 2015, 9:06:48 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

Cosmetic changes.

Legend:

Unmodified
Added
Removed
Modified
  • TracPlugins

    v80 v81  
    1515To install `setuptools`, download the bootstrap module [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] and execute it as follows:
    1616
    17 {{{
     17{{{#!sh
    1818$ python ez_setup.py
    1919}}}
     
    3434 * Run:
    3535
    36 {{{
     36{{{#!sh
    3737$ python setup.py bdist_egg
    3838}}}
     
    5353
    5454Some plugins, such as [trac:SpamFilter SpamFilter], are downloadable as an `.egg` file that can be installed with `easy_install`:
    55 {{{
    56 easy_install TracSpamFilter
     55{{{#!sh
     56$ easy_install TracSpamFilter
    5757}}}
    5858
     
    6060
    6161If Trac reports permission errors after installing a zipped egg, and you would rather not bother providing a egg cache directory writable by the web server, you can get around it by simply unzipping the egg. Just pass `--always-unzip` to `easy_install`:
    62 {{{
    63 easy_install --always-unzip TracSpamFilter-0.4.1_r10106-py2.6.egg
     62{{{#!sh
     63$ easy_install --always-unzip TracSpamFilter-0.4.1_r10106-py2.6.egg
    6464}}}
    6565You should end up with a directory having the same name as the zipped egg (complete with `.egg` extension) and containing its uncompressed contents.
     
    7070
    7171`easy_install` makes installing from source a snap. Just give it the URL to either a Subversion repository or a tarball/zip of the source:
    72 {{{
    73 easy_install http://svn.edgewall.com/repos/trac/plugins/0.12/spam-filter-captcha
     72{{{#!sh
     73$ easy_install http://svn.edgewall.com/repos/trac/plugins/0.12/spam-filter-captcha
    7474}}}
    7575
     
    7979
    8080This is done in the `[components]` section of the configuration file. For example:
    81 {{{
     81{{{#!ini
    8282[components]
    8383tracspamfilter.* = enabled
     
    9898
    9999If you are uncertain about the location of the egg, here's a small tip to help locate an egg (or any package). Just replace `myplugin` with whatever namespace the plugin uses (as used when enabling the plugin):
    100 {{{
     100{{{#!pycon
    101101>>> import myplugin
    102102>>> print myplugin.__file__
     
    109109
    110110To do this from the Apache configuration, use the `SetEnv` directive:
    111 {{{
     111{{{#!apache
    112112SetEnv PYTHON_EGG_CACHE /path/to/dir
    113113}}}
     
    116116
    117117For example (for CGI):
    118 {{{
     118{{{#!apache
    119119 <Location /trac>
    120120   SetEnv TRAC_ENV /path/to/projenv
     
    124124
    125125Or (for mod_python):
    126 {{{
     126{{{#!apache
    127127 <Location /trac>
    128128   SetHandler mod_python
     
    138138'''Note''': that if you already use -initial-env to set the project directory for either a single project or parent you will need to add an additional -initial-env directive to the !FastCgiConfig directive:
    139139
    140 {{{
     140{{{#!apache
    141141FastCgiConfig -initial-env TRAC_ENV=/var/lib/trac -initial-env PYTHON_EGG_CACHE=/var/lib/trac/plugin-cache
    142142}}}
     
    151151
    152152Try this from the command line:
    153 {{{
     153{{{#!sh
    154154$ python -c "import pkg_resources"
    155155}}}
     
    205205
    206206You probably want to disable the second function for security reasons. In `trac.ini`, in the `[components]` section, add the line:
    207 {{{
     207{{{#!ini
    208208trac.admin.web_ui.PluginAdminPanel = disabled
    209209}}}