Edgewall Software

Changes between Version 45 and Version 46 of TracPlugins


Ignore:
Timestamp:
Feb 4, 2008, 7:46:40 PM (16 years ago)
Author:
osimons
Comment:

Updating some information on plugin loading (ref. #6468), and also added some information about uninstalling plugins.

Legend:

Unmodified
Added
Removed
Modified
  • TracPlugins

    v45 v46  
    3434Once 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.
    3535
     36To uninstall a plugin installed this way, remove the egg from `plugins` directory and restart web server.
     37
    3638Note that the Python version that the egg is built with must
    3739match the Python version with which Trac is run.  If for
     
    3941upgraded your standalone Python to 2.4, the eggs won't be
    4042recognized.
     43
     44Note also that in a multi-project setup, a pool of Python interpreter instances will be dynamically allocated to projects based on need, and since plugins occupy a place in Python's module system, the first version of any given plugin to be loaded will be used for all the projects. In other words, you cannot use different versions of a single plugin in two projects of a multi-project setup. It may be safer to install plugins for all projects (see below) and then enable them selectively on a project-by-project basis.
    4145
    4246=== For All Projects ===
     
    7680
    7781Note: After installing the plugin, you need to restart your web server.
     82
     83==== Uninstalling ====
     84
     85`easy_install` or `python setup.py` does not have an uninstall feature. Hower, it is usually quite trivial to remove a globally installed egg and reference:
     86 1. Delete the .egg file or folder from where it is installed, usually inside `$PYTHONLIB/site-packages/`.
     87 1. Edit the `$PYTHONLIB/site-packages/easy-install.pth` text file and delete the line that contains the reference to the removed egg.
     88 1. Restart web server.
     89
     90If you are uncertain about the location of the egg, here is a small tip to help locate an egg (or any package) - replace `myplugin` with whatever namespace the plugin uses (as used when enabling the plugin):
     91{{{
     92>>> import myplugin
     93>>> print myplugin.__file__
     94/opt/local/python24/lib/site-packages/myplugin-0.4.2-py2.4.egg/myplugin/__init__.pyc
     95}}}
    7896
    7997== Setting up the Plugin Cache ==