mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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.
(cherry picked from commit 5291639e61
)
Co-authored-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
9b34f34aa9
commit
09a698b474
5 changed files with 12 additions and 7 deletions
2
setup.py
2
setup.py
|
@ -1012,7 +1012,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue