summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorFX Coudert <fxcoudert@gmail.com>2020-12-03 03:20:18 (GMT)
committerGitHub <noreply@github.com>2020-12-03 03:20:18 (GMT)
commit5291639e611dc3f55a34666036f2c3424648ba50 (patch)
treec74cfede75fd29875b22d66ca9593eff028b69e1 /setup.py
parentdedc2cd5f02a2e2fc2c995a36a3dccf9d93856bb (diff)
downloadcpython-5291639e611dc3f55a34666036f2c3424648ba50.zip
cpython-5291639e611dc3f55a34666036f2c3424648ba50.tar.gz
cpython-5291639e611dc3f55a34666036f2c3424648ba50.tar.bz2
bpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556)
macOS releases numbering has changed as of macOS 11 Big Sur. Previously, major releases were of the form 10.x, 10.x+1, 10.x+2, etc; as of Big Sur, they are now x, x+1, etc, so, for example, 10.15, 10.15.1, ..., 10.15.7, 11, 11.0.1, 11.1, ..., 12, 12.1, etc. Allow Python to build with single-digit deployment target values. Patch provided by FX Coudert.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index b7a7d26..0c9a425 100644
--- a/setup.py
+++ b/setup.py
@@ -1014,7 +1014,7 @@ class PyBuildExt(build_ext):
os_release = int(os.uname()[2].split('.')[0])
dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
if (dep_target and
- (tuple(int(n) for n in dep_target.split('.')[0:2])
+ (tuple(int(n) for n in str(dep_target).split('.')[0:2])
< (10, 5) ) ):
os_release = 8
if os_release < 9: