[XML-SIG] Installing to split prefix/exec-prefix

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 26 Jul 2001 08:45:02 +0200


> In other words, I expected .py files to go to
> 
> python_common/lib/python2.1/site-packages/_xmlplus
> 
> and exec_prefix related stuff to
> 
> python_<OS>/lib/python2.1/site-packages/_xmlplus
> 
> or better, to
> 
> python_<OS>/lib/python2.1/lib-dynload
> 
> Is this the way it's supposed to be?
> Is this a distutils or PyXML problem?
> Should I do things differently?

Yes, you should do things differently. First, distutils does not
support installing packages into two location (exec_prefix/lib and
prefix/lib); it will always put them into install_lib (which will be
either platlib or purelib, depending on whether the package has
extension modules - which PyXML always has).

Even if you'd manage to install PyXML into two locations, it would not
work. This is a Python problem: If a package directory is found in
multiple location, only the first location is used. Otherwise, which
__init__ would you execute? In turn, you would not find
xml.parsers.sgmlop, since that would live in
exec_prefix/site-packages/..., which would not be part of the package.

It is possible to work around these limitations; if they are important
to you, you may consider providing a patch.

Regards,
Martin