distutils & OS X universal binaries

Robin Becker robin at NOSPAMreportlab.com
Sat Dec 8 11:01:16 EST 2007


Martin v. Löwis wrote:
>>> A user reports problems with one of our extensions when running the 
>>> intel compiled extension on ppc and vice versa. He is building the 
>>> extension as a universal binary. Although the intel compiled version 
>>> runs fine it displays a known bug when run on a ppc.
>> Have you reported the problem at http://bugs.python.org/? A minimal
>> example could help us to fix the problem.
> 
> At first, I also thought that Robin suggested that there is a problem
> with Python. Upon re-reading, I now believe he rather sees the bug
> in the reportlabs code, and is asking for an approach to solve it there.
>.....

Yes that's right. Unfortunately this problem doesn't arise in the python 
interface, but in libart_lgpl which we depend on. I will look at the 
pyconfig.h code to see how our definition should be put into libart's .h 
config file. Presumably I can then remove the calculated definition we 
have in our setup.py script or at least override it in the right way.

PIL may also have a similar problem as the 1.1.6 setup.py script also 
defines WORDS_BIGENDIAN like this

         if struct.unpack("h", "\0\1")[0] == 1:
             defs.append(("WORDS_BIGENDIAN", None))

probably I borrowed/stole this as we have something very similar in our 
setup.py.
-- 
Robin Becker



More information about the Python-list mailing list