Re: [Distutils] [PEAK] Re: problem with EasyInstall 0.6a10 + pkg manager

At 10:53 AM 3/1/2006, Ronny Pfannschmidt wrote:
Phillip J. Eby wrote:
At 09:35 AM 3/1/2006, Ronny Pfannschmidt wrote:
With the latest version of EasyInstall i had a major problem with the "exhaustive testing of the install directory, including a spawn test for .pth file support" since my pkg manager uses `setup.py install --root=Dest` to install the pkg in a image directory, before installing it on the system.
actually i work around this by creating the needed dirs and adding them to PYTHONPATH
is there a nicer way too work with such pkg managers ?
Yes. Use "setup.py install --single-version-externally-managed --root=Dest", which will do the installation in a way that's package manager friendly.
I may change this at some point so that a --root (other than /) automatically triggers the other option, but at the moment I'm not sure whether that would interfere with anything else. i tried the option, and found several problems while the python modules where installed fine much of the other data is thrown right into /usr (wich isnt very nice)
as result the program (pida) was not working anymore ( while it worked with the dirty workaround), since it was written for a egg image, wich implies, that much of the data is in the root of the egg image and usually the path can be resolved by the module path
Ah. Don't do that. If your packages have data, put them inside a package directory, and use the pkg_resources module APIs to access them. Then your code will work no matter how it's installed. I would go so far in fact as to say that you should *never* use the disutils' data files installation for constant data files that your program needs access to at runtime. The "data files" option should be used only for example configuration files, documentation, etc. If your packages need data, install it as package data.
participants (1)
-
Phillip J. Eby