X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/81c62f9b01b1c2ceaad75dec6191cbdcce5419ad..4729ff0812c1f3d06d98524e2fec232d3bf90513:/doc/todo/location_of_external_plugins.mdwn?ds=sidebyside diff --git a/doc/todo/location_of_external_plugins.mdwn b/doc/todo/location_of_external_plugins.mdwn index b55bca324..204b588b0 100644 --- a/doc/todo/location_of_external_plugins.mdwn +++ b/doc/todo/location_of_external_plugins.mdwn @@ -1,3 +1,32 @@ -Would it be possible to make the installation location for the external plugins (those talked to via xmlrpc) configurable? Currently, they are installed into (and later expected to be in) /usr/lib/ikiwiki/plugins. For the Fedora package (which I maintain), I move them to /usr/libexec/ikiwiki/plugins. While not covered by the FHS, this seems to be a more appropriate place, see: https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir. +Would it be possible to make the installation location for the external +plugins (those talked to via xmlrpc) configurable? Currently, they are +installed into (and later expected to be in) /usr/lib/ikiwiki/plugins. For +the Fedora package (which I maintain), I move them to +/usr/libexec/ikiwiki/plugins. While not covered by the FHS, this seems to +be a more appropriate place, see: +https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir. + +> This would need to be a build time configuration setting so the directory +> is built into ikiwiki for use at runtime. --[[Joey]] As a side note, the accompanying proxy.py might better be placed into some directory on the python path. + +> If someone can show how to do so without needing a Setup.py and all the +> pain that using one entails.. --[[Joey]] + +>> At the very least I don't think proxy.py should be on the `sys.path` +>> under its current name. If it was renamed to ikiwiki_proxy or some such, +>> possibly; but I think it's more appropriate to have it in an +>> ikiwiki-specific directory (a "private module") since it's not useful for +>> anything outside ikiwiki, and putting it in the same directory as the +>> external plugins means it's automatically in their `sys.path` without +>> needing special configuration. --[[smcv]] +>> (a mostly-inactive member of Debian's Python modules packaging team) + +>>> 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: +>>> +>>> - 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); +>>> - 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. +>>> +>>> Any better idea (and sorry for digging up an old post)? +>>> -- [[Louis|spalax]]