开发者

Change the gcc version that distutils uses

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜