Changes between Version 2 and Version 3 of TracPlugins
- Timestamp:
- 22/02/2023 10:14:46 (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracPlugins
v2 v3 7 7 == Plugin discovery 8 8 9 From the user's point of view, a plugin is either a single .py file or a package (.egg or .whl). Trac looks for plugins in Python's `site-packages` directory, the [TracIni#GlobalConfiguration global shared] `plugins` directory and the [TracEnvironment project environment] `plugins` directory. Plugins installed to the project environment `plugins` directory are enabled, unless explicitly disabled in the `[components]` section of the `trac.ini` file. Plugins installed elsewhere must be explicitly enabled in the [[TracIni#components-section| [components] ]] section of the `trac.ini` file.9 A plugin is either a single .py file or a package (.egg or .whl). Trac looks for plugins in Python's `site-packages` directory, the [TracIni#GlobalConfiguration global shared] `plugins` directory and the [TracEnvironment project environment] `plugins` directory. Plugins installed to the project environment `plugins` directory are enabled, unless explicitly disabled in the `[components]` section of the `trac.ini` file. Plugins installed elsewhere must be explicitly enabled in the [TracIni#components-section "[components]"] section of the `trac.ini` file. 10 10 11 11 == Installing a Trac plugin … … 15 15 === For a single project 16 16 17 Packages built for a single project must use the egg 18 format, as the wheel format (described below) is not 19 supported by the setuptools loading mechanism. Build the `egg` file from the plugin source: 17 Packages built for a single project must use the egg format, as the wheel format (described below) is not supported by the setuptools loading mechanism. Build the `egg` file from the plugin source: 20 18 21 19 * Checkout or download and unpack the source. 22 * Change to the directory containing `setup.py`. 23 * Run: 20 * Change to the directory containing `setup.py` and run: 24 21 {{{#!sh 25 22 $ python setup.py bdist_egg … … 52 49 ==== From PyPI 53 50 54 Some plugins, such as [ th:TagsPlugin TracTags], can be installed directly from [https://pypi.org PyPI] using `pip`:51 Some plugins, such as [https://trac-hacks.org/wiki/TagsPlugin TracTags], can be installed directly from [https://pypi.org PyPI] using `pip`: 55 52 {{{#!sh 56 53 $ pip install TracTags