summaryrefslogtreecommitdiff
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2011-05-15 16:44:27 +0200
committerRonald Oussoren <ronaldoussoren@mac.com>2011-05-15 16:44:27 +0200
commit7c10778ef104ba5be60b6812db59872c1007ce4a (patch)
tree0c3a6fdac45f7b974fd49f5df0185fdd7b1d5e44 /Lib/distutils/util.py
parent4672fdc66b62eb9f6b9d1d193e026ce566acdc79 (diff)
downloadcpython-7c10778ef104ba5be60b6812db59872c1007ce4a.tar.gz
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.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index f06e4fdf88..6c49f0b1cb 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -97,9 +97,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,