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

Sérgio Durigan Júnior sergiodj at linux.vnet.ibm.com
Sat Apr 12 00:24:17 CEST 2008


Hi Martin,

On Fri, 2008-04-11 at 23:58 +0200, "Martin v. Löwis" wrote:

> My question is simple:

It's also off-topic for python-dev, which is about the development of Python, not the development with Python.

With all respect, I think you're confusing things. I'm here trying to find some solutions for Python's build system (which, AFAIK, is about the development of Python), which I think is bogus on some systems. I'm just trying to better understand how it works here, and maybe send some patches if I find some solution for my problems.

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

You can't install them both into the same prefix (obviously, as they would overwrite their binary files).

I was thinking about renaming the binary files, since they're (apparently) the only things that get overwritten and are dependent of the bit size (32/64). The rest of the files that would be overwritten, AFAIK, is not dependent of bitness so there's no problem at all. I think this may work (actually, I did the same thing successfuly with Perl).

With two installation, use the header files you got from the 32-bit install for 32-bit extensions/embedding, and the header files you got from the 64-bit install for 64-bit extensions/embedding. The only header file that will actually differ is pyconfig.h.

If I correctly understand what you're saying, you're proposing installing the header files in different places, right? Since these files are the same (except for pyconfig.h, as you said), I assume that the reason for this separation is only for safety. I'll consider your proposal.

Regards,

-- Sérgio Durigan Júnior Linux on Power Toolchain - Software Engineer Linux Technology Center - LTC IBM Brazil



More information about the Python-Dev mailing list