mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.
This commit is contained in:
parent
2bff9fcec2
commit
222e89a598
6 changed files with 126 additions and 27 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue