Josselin Mouette <[EMAIL PROTECTED]> writes: > Le lundi 01 octobre 2007 à 18:37 +1000, Ben Finney a écrit : > > How can I use the tools available — distutils, setuptools, > > debhelper — to install these package-specific modules to a > > package-specific location, such that all the programs in the > > package will be able to find them? > > The easiest way, if the modules are relocatable (99% of them are) is > to simply move them after installation. > > Otherwise, you can pass specific arguments to setup.py. That would > be, python setup.py install --home=/usr/share/$package > --install-purelib=. > > More information: > http://www.python.org/doc/2.4/inst/search-path.html
Thanks, this is a useful pointer. I wasn't aware such fine-grained control was available over locations with distutils. (I've certainly never seen any Python author using that control.) > > Hmm. I am hoping that "modify the programs [to add an absolute > > path to the search path]" is not a necessary part of this. > > If upstream hasn't thought of it, it is. You only need to add one > line in the program, before the module is imported. How can upstream anticipate the arbitrary path I pass to './setup.py install --home="/foo/bar"' if the path "/foo/bar" is up to me as a Debian packager? I don't see how any Python program can be written to allow for that without modification every time the "/foo/bar" changes. -- \ "Everything you read in newspapers is absolutely true, except | `\ for that rare story of which you happen to have first-hand | _o__) knowledge." -- Erwin Knoll | Ben Finney -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]