[Distutils] Incorrect detection of 32/64-bit arch on Linux for old 32-bit VMs migrated to 64-bit kernels
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Jan 30 16:46:32 EST 2016
Nathaniel Smith wrote:
> The problem seems to be that distutils.util.get_platform() assumes
> that the architecture is whatever uname's "machine" field says
> (equivalent to uname -m). Unfortunately, this gives the architecture
> of the kernel, not of the Python interpreter.
>
> I think the fix is that we should add some check like
>
> if osname == "linux" and machine == "x86_64" and sys.maxsize == 2147483647:
> machine = "i686"
If you fix this, please do it for other platforms as well.
I encountered the same problem on MacOSX, where for historical
reasons I have installed Python and all my compiled-from-source
libraries as 32 bit. The result is that py2app includes the
wrong version of the stub executable in the apps it builds.
Conceivably a similar thing could happen on Windows, although
I haven't tested it.
--
Greg
More information about the Distutils-SIG
mailing list