]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/location_of_external_plugins.mdwn
typo
[git.ikiwiki.info.git] / doc / todo / location_of_external_plugins.mdwn
1 Would it be possible to make the installation location for the external
2 plugins (those talked to via xmlrpc) configurable? Currently, they are
3 installed into (and later expected to be in) /usr/lib/ikiwiki/plugins. For
4 the Fedora package (which I maintain), I move them to
5 /usr/libexec/ikiwiki/plugins. While not covered by the FHS, this seems to
6 be a more appropriate place, see:
7 https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir.
9 > This would need to be a build time configuration setting so the directory
10 > is built into ikiwiki for use at runtime. --[[Joey]]
12 As a side note, the accompanying proxy.py might better be placed into some directory on the python path.
14 > If someone can show how to do so without needing a Setup.py and all the
15 > pain that using one entails.. --[[Joey]]
17 >> At the very least I don't think proxy.py should be on the `sys.path`
18 >> under its current name. If it was renamed to ikiwiki_proxy or some such,
19 >> possibly; but I think it's more appropriate to have it in an
20 >> ikiwiki-specific directory (a "private module") since it's not useful for
21 >> anything outside ikiwiki, and putting it in the same directory as the
22 >> external plugins means it's automatically in their `sys.path` without
23 >> needing special configuration. --[[smcv]]
24 >> (a mostly-inactive member of Debian's Python modules packaging team)
26 >>> I mostly agree, but a problem arises when the external plugin we are using is not located in the same directory as the `proxy.py` file, but in a directory somewhere in a `libdir` or `libdirs` directory. Right now (for a soon-to-be published plugin I am working on) the solutions I am thinking about are:
27 >>> 
28 >>> - Call ikiwiki using ``PYTHONPATH="$PYTHONPATH:/usr/lib/ikiwiki/plugins ikiwiki ...``, but it is a pain to write this each time I want to use this (and any solution like creating a custom script do not seem very nice);
29 >>> - Make my plugin add `/usr/lib/ikiwiki/plugins` to its python path, but I do not know how portable this is for a non Debian distribution.
30 >>>
31 >>> Any better idea (and sorry for digging up an old post)?
32 >>> -- [[Louis|spalax]]