Build Cython and gevent on OSX
When I build gevent, I get an error
Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.1/bin/cython", line 7, in from Cython.Compiler.Main import main File "/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Main.py", line 19, in import Code ImportError: dlopen(/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Code.so, 2): no suitable image found. Did find: /usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Code.so: mach-o, but wrong architecture
I tried开发者_如何学C to specify architecture with CFLAGS="-arch x86_64", but it does not work.
Recompilation gevent-1.0dev and greenlet with flags CFLAGS="-arch i386 -arch x86_64" is a solution to my problem.
The gevent releases include the generated .c sources so you don't need Cython to build them.
The development version (1.0) also has automatically generated tarballs that includes those .c files: http://code.google.com/p/gevent/downloads/list
精彩评论