On Fri, May 24, 2013 at 6:29 AM, dbv <
dinesh...@hotmail.com> wrote:
> How would you build a 32-bit version of Cython on a 64-bit OSX machine?
use a 32 bit Python.
Apple's python (I think) is universal, so with the right magic
incantations, you can get it to run in 32 bit mode. However, I've
found that trickly, particularly for building extensions.
My solution is a total hack:
1) Install one of the binaries from Python.org:
32 bit ppc_Intel
32+64 bit
whichone depends on if you want to support older systems, and if you
are OK with using an older complier.
2) Hack it to run the one you want:
- for the 32 bit one, if you're running an intel machine, it will
run 32bit intel -- you're done
- for the Intel one, you can use lipo to remove the 64 bit binary
from the main python executable (I told you this was a hack!)
3) hack the config so that it will only build the platform you want
when bulding extensions:
edit: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile
remove the "-arch x86_64" or "-arch ppc" from the two places it
appears in there.
then you'll have a 32 bit python that builds 32 bit only extensions.
yes -- this is a major hack, but it's working for me.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R
(206) 526-6959 voice
7600 Sand Point Way NE
(206) 526-6329 fax
Seattle, WA 98115
(206) 526-6317 main reception
Chris....@noaa.gov