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

Luis P Caamano lpc@racemi.com
Fri, 27 Jul 2001 08:57:20 -0400


> -----Original Message-----
> From: Martin v. Loewis [mailto:martin@loewis.home.cs.tu-berlin.de]
> Sent: Thursday, July 26, 2001 2:45 AM
> To: lpc@racemi.com
> Cc: xml-sig@python.org
> Subject: Re: [XML-SIG] Installing to split prefix/exec-prefix
> 
> 
> > 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).

Guess it's time to send a disutils bug report then.

> 
> 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? 

Understood, a python problem.

Pardon my ignorance, but, would it be true to say that
.py[co], files should NEVER exist in exec_prefix?  If so,
then __init__.py would always be in prefix.  Also,
'unpure' packages would always be split between prefix
and exec_prefix, and thus, should be tested that way.

python bug?

> 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.

Understood.

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

Well, currently the work around is to have packages like PyXML
(almost all the packages I've used) reside completely in exec_prefix.

After playing with split prefix/exec_prefix I've found that it
has not been tested much outside of python itself, which works
fine with split dirs.  My opinion is that split dirs just
doesn't work as advertised in practice.  Too bad.

> 
> Regards,
> Martin
> 

Thanks for your reply Martin.



----------------------------------
Luis P. Caamano 
lcaamano@mindspring.com
Atlanta, GA, USA
----------------------------------