This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ronaldoussoren, srid, stoneyb, tarek
Date 2010-09-16.15:33:38
SpamBayes Score 2.8308578e-11
Marked as misclassified No
Message-id <1284651225.56.0.944116697993.issue9516@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-09-16 15:33:45ronaldoussorensetrecipients: + ronaldoussoren, tarek, srid, stoneyb
2010-09-16 15:33:45ronaldoussorensetmessageid: <1284651225.56.0.944116697993.issue9516@psf.upfronthosting.co.za>
2010-09-16 15:33:43ronaldoussorenlinkissue9516 messages
2010-09-16 15:33:42ronaldoussorencreate