diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2011-05-15 14:46:11 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2011-05-15 14:46:11 (GMT) |
commit | 222e89a598664e4cffc2928da676ec22921ecc94 (patch) | |
tree | 1db33d276e14ff41224588ae4e0647f661c318df /Lib/distutils/util.py | |
parent | 2bff9fcec23798dd192932842bae9855ed47a862 (diff) | |
download | cpython-222e89a598664e4cffc2928da676ec22921ecc94.zip cpython-222e89a598664e4cffc2928da676ec22921ecc94.tar.gz cpython-222e89a598664e4cffc2928da676ec22921ecc94.tar.bz2 |
Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is set in shell.
Without this patch python will fail to start properly when the environment
variable MACOSX_DEPLOYMENT_TARGET is set on MacOSX and has a value that is
not compatible with the value during Python's build. This is caused by code
in sysconfig that was only meant to be used in disutils.
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r-- | Lib/distutils/util.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index ce3cd6c..d6f89d6 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -96,9 +96,7 @@ def get_platform (): from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() - macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if 1: # Always calculate the release of the running machine, |