[Python-Dev] Python 32- and 64-bit living together (original) (raw)

M.-A. Lemburg mal at egenix.com
Fri Apr 11 22:06:19 CEST 2008


On 2008-04-11 20:21, Sérgio Durigan Júnior wrote:

Hi Lemburg,

On Fri, 2008-04-11 at 19:38 +0200, M.-A. Lemburg wrote: On 2008-04-11 19:10, Sérgio Durigan Júnior wrote:

Hi all,

My question is simple: is there any problem when installing/using both 32- and 64-bit Python's on the same machine? I'm more concerned about header files (those installed under /usr/include/python-2.x), because as far as I could see there's nothing similar to a "#ifdef USE64BIT" or something on them. The include files are all static and can be used on both 32-bit and 64-bit platforms or installations. Thanks :-). Only the /usr/lib/python2.x files differ between 32-bit and 64-bit (the configuration files are in /usr/lib/python2.x/config). Hmm, right. I tried to modify the installation path (using --libdir in ./configure) to /usr/lib64, but some *.pyo objects still are installed under /usr/lib. AFAIK, these objects are bitness-dependent (i.e., if they were generated by a 32-bit Python, they can only be execute by a 32-bit Python - and vice-versa), right?

Right.

Is there any way to separate these arch-dependent files in /usr/lib and /usr/lib64 depending on their bitness?

There's no need for that. Only the config/ dir which is included in the Python lib dir is dependent on the Python configuration.

Thanks,

P.S.: I think this "misbehaviour" of --libdir is a bug. IMHO, it should put every arch-dependent file in the path that the user provided.

You should probably have a look at how RedHat or openSUSE solve these problems. Some of them have patched Python to fit their needs. You may have to do that as well.

-- Marc-Andre Lemburg eGenix.com

Professional Python Services directly from the Source (#1, Apr 11 2008)

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,MacOSX for free ! ::::

eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
        Registered at Amtsgericht Duesseldorf: HRB 46611


More information about the Python-Dev mailing list