我在Mac OS X 10.6版本上使用Python。我最近安装了最新的Mac OS X开发人员工具SDK,其中包含GCC。我拥有的软件开发工具包是:如何使Python和distutils在Mac OS X上使用正确的SDK?
$ ls /Developer/SDKs/
MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk
我想使用的Mac OS X 10.6与Python /的distutils,每当我安装一个Python包“的setup.py安装”,需要编译。
我注意到,Python的经过-isysroot标志和路径的Mac OS X 10.5 (未10.6),即:
$ python-config --cflags --ldflags
-I/Library/Frameworks/EPD64.framework/Versions/7.0/include/python2.7 -I/Library/Frameworks/EPD64.framework/Versions/7.0/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Library/Frameworks/EPD64.framework/Versions/7.0/include
-L/Library/Frameworks/EPD64.framework/Versions/7.0/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 EPD64.framework/Versions/7.0/Python
我如何纠正呢?我希望它使用10.6 SDK。
现在,当我运行在所有需要C语言编译程序包“蟒蛇的setup.py安装”,它的产量,看起来像这样GCC电话:
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Library/Frameworks/EPD64.framework/Versions/7.0/include -DHAVE_RINTF=1 -DHAVE_FINITE=1 -DHAVE_EXPM1=1 -DHAVE_RINT=1 -DHAVE_LOG2=1 -DHAVE_LOGBL=1 -DHAVE_SNPRINTF=1 -DHAVE_LOG1P=1 -DHAVE_ROUND=1 -DHAVE_FMIN=1 -Iinclude -Isrc/lapack -Isrc/f2c -I/Library/Frameworks/EPD64.framework/Versions/7.0/include/python2.7 -c src/f2c/signal_.c -o build/temp.macosx-10.5-x86_64-2.7/src/f2c/signal_.o
这就要求在其路径10.5的SDK。
我使用Python的Enthought Python Distribution安装以防万一。
非常感谢。