[Distutils] bdist_rpm and bdist on x86-64

M.-A. Lemburg mal at egenix.com
Tue Apr 19 15:00:49 CEST 2005


Jeremy Sanders wrote:
> On Mon, 18 Apr 2005, M.-A. Lemburg wrote:
> 
>> Why not os.exists() ?

s/os.exists/os.path.exists

> Probably better :-)
> 
>> Wouldn't checking for the lib file in either lib64
>> or lib be more reliable ?
> 
> That might be better. I don't know whether it's possible that more than
> one python is installed (one in /lib and one in /lib64).

That would certainly be possible.

>> Hmm, this is not entirely correct, e.g. Suse 9.2 puts
>> the site-packages directory and all the other .py files
>> into /usr/lib64 as well - not only the platforma dependent
>> files.
>>
>> Not sure what other AMD64 distros do... but I have a feeling
>> the /lib/ should *always* be replaced by unix_platlib.
> 
> 
> It looks like RedHat/Fedora patch their package to only put the platform
> specific files in /lib64 (that's how I made my patch).
> 
> Perhaps this isn't a good idea to do then :-(  I wonder whether it would
> be possible for distribution to set these values somewhere. Couldn't
> python have a sys function to return its Makefile?

It's rather easy to find the right Makefile: just look
for os.py (the landmark used in Python to initialize sys.path
on startup), join it's path with "config" and you're there.

More details can be found in Modules/getpath.c of the Python
source distribution.

You can then have distutils parse that file to extract
the other details.

Note that this doesn't work if you're importing from a
ZIP file.

> (anyway, I've managed to get my setup.py to work with the built-in
> distutils...)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 19 2005)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Distutils-SIG mailing list