Hello, we currently suggest users to run python with "arch -i386" to use the 32-bit version:
WARNING: You are running 64-bit Python. Created binary will not work on Mac OS
X 10.4 or 10.5. For this version it is necessary to create 32-bit binaries. If
you need 32-bit version of Python, run Python as 32-bit binary by command:
arch -i386 python
Alas, this does not work with the standard Python framework that comes with OSX:
rasky@breathe:~/Sources/pyinstaller-git$ arch -i386 python
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> hex(sys.maxint)
'0x7fffffffffffffff'
This problem is partially described here:
http://bugs.python.org/msg94634
It looks like Macports inherits the same problem:
https://trac.macports.org/ticket/23663
The old suggestion of setting the magic environment variable instead works very
well:
rasky@breathe:~/Sources/pyinstaller-git$ VERSIONER_PYTHON_PREFER_32_BIT=yes
python
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> hex(sys.maxint)
'0x7fffffff'
I suggest we switch back to suggest using this environment variable to run the
32-bit version of Python under Mac; at the same time, we can remove the cruft
code from compat that tries to run the Python binary using "arch", as it does
not work as intended anyway. The environment variable will be automatically
inherited from the main process to subprocesses and thus all subprocesses will
be 32-bti as well.
--
Giovanni Bajo :: [email protected]
Develer S.r.l. :: http://www.develer.com
My Blog: http://giovanni.bajo.it
smime.p7s
Description: S/MIME cryptographic signature
