[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure
Ronald Oussoren
report at bugs.python.org
Thu Sep 16 17:33:45 CEST 2010
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
I've attached a patch for 3.2 that should fix the issue.
The patch adds a couple of testcases (1 for sysconfig and 1 for distutils.command.build_ext), adjust a couple more and implements the following functional changes:
1) sysconfig._init_posix no longer does anything with
MACOSX_DEPLOYMENT_TARGET in the environment
2) sysconfig.get_platform always uses MACOSX_DEPLOYMENT_TARGET from
the Makefile and ignores the setting from the environment
(in hindsight looking at the environment was wrong, particularly
because that also affects the name of bdist_* files and that can
confuse tools like distutils)
3) distutils.util.get_platform was changed in the same way and for
the same reason.
4) distutils.sysconfig._init_posix does still look at
MACOSX_DEPLOYMENT_TARGET but changes the environment by updating
os.environ instead of calling os.putenv. The latter is very
confusing when you're debugging environment issues.
I'm not 100% sure about the (lack of) change to distutils.sysconfig._init_posix. It might be better to just always use the deployment target that was specified during the build of python itself.
There is a use-case for overriding the deployment target though: locally build an extension that you use on your machine and that uses compiler/library features that require a newer deployment target than the one used to build python itself.
----------
keywords: +patch
Added file: http://bugs.python.org/file18901/issue9516.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9516>
_______________________________________
More information about the Python-bugs-list
mailing list