]> granicus.if.org Git - python/commit
Issue #9516: Change distutils to no longer globally attempt to check and
authorNed Deily <nad@acm.org>
Wed, 29 Jun 2011 02:40:39 +0000 (19:40 -0700)
committerNed Deily <nad@acm.org>
Wed, 29 Jun 2011 02:40:39 +0000 (19:40 -0700)
commit041645a8cb4c97e7e798fa638e1e9039933d8b40
tree92f622911306e69bcf526d4d93ae7f355fe0d16e
parent053c6ad6b7ee88d9076a91f47aa53dc7155d00ce
Issue #9516: Change distutils to no longer globally attempt to check and
set the MACOSX_DEPLOYMENT_TARGET env variable for the interpreter process
on OS X.  This could cause failures in non-distutils subprocesses and was
unreliable since tests or user programs could modify the interpreter
environment after distutils set it.  Instead, have distutils set the
the deployment target only in the environment of each build subprocess.

Continue to use the previous algorithm for deriving the deployment target
value:
    if MACOSX_DEPLOYMENT_TARGET is not set in the interpreter's env:
        use the interpreter build configure MACOSX_DEPLOYMENT_TARGET
    elif the MACOSX_DEPLOYMENT_TARGET env value >= configure value:
        use the env MACOSX_DEPLOYMENT_TARGET
    else: # env value less than interpreter build configure value
        raise exception
This allows building extensions that can only run on newer versions of
the OS than the version python was built for, for example with a python
built for 10.3 or later and an extension that needs to be built for 10.5.
Lib/distutils/spawn.py
Lib/distutils/sysconfig.py