]> 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:44:24 +0000 (19:44 -0700)
committerNed Deily <nad@acm.org>
Wed, 29 Jun 2011 02:44:24 +0000 (19:44 -0700)
commita8f8b50bd7c8d36935178a2f9f386d6b250d1eed
tree6ce2cea0ed9024fef3b2ce0a32039220d56480ea
parentd13007fa114ffd9524eb9ea5f0ad2cad3cda0074
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