开发者

Change the gcc version that distutils uses

开发者 https://www.devze.com 2023-01-06 22:57 出处:网络
I\'m on Snow Leopard, and want distutils to use gcc 4.0 and not 4.2, can anyone tell me how to make it do that? I\'ve tried changing the /usr/bin/g* symlinks, 开发者_如何学运维and setting the C* envir

I'm on Snow Leopard, and want distutils to use gcc 4.0 and not 4.2, can anyone tell me how to make it do that? I've tried changing the /usr/bin/g* symlinks, 开发者_如何学运维and setting the C* environment vars -- but to no avail. Any thoughts?


Did you try python setup.py build --compiler=gcc? it is described in the docs.

EDIT: Also, this discussion looks very similar the present one. distutils.core appears to have the functions to specify the compiler and platform. distutils.ccompiler.get_compiler(osname, platform) or distutils.ccompiler.new_compiler(platform, compiler, verbose, dry_run, force) should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号