summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-11-24 00:26:31 (GMT)
committerGitHub <noreply@github.com>2020-11-24 00:26:31 (GMT)
commit3266991e721286e942125350ca41e1403d8384d6 (patch)
tree10358e6247d1474dd1d5c217b66a7e9a3912e77b
parentb6416052f7cc79e45d5cbcaca08e12e4bb0895fc (diff)
downloadcpython-3266991e721286e942125350ca41e1403d8384d6.zip
cpython-3266991e721286e942125350ca41e1403d8384d6.tar.gz
cpython-3266991e721286e942125350ca41e1403d8384d6.tar.bz2
bpo-41100: minor build installer fixes (GH-23480)
(cherry picked from commit 936533ca0415c40dc64ccb5f8857720f32b3fcb4) Co-authored-by: Ned Deily <nad@python.org>
-rwxr-xr-xMac/BuildScript/build-installer.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 184add4..16816d1 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -587,8 +587,8 @@ def checkEnvironment():
Check that we're running on a supported system.
"""
- if sys.version_info[0:2] < (2, 5):
- fatal("This script must be run with Python 2.5 (or later)")
+ if sys.version_info[0:2] < (2, 7):
+ fatal("This script must be run with Python 2.7 (or later)")
if platform.system() != 'Darwin':
fatal("This script should be run on a macOS 10.5 (or later) system")
@@ -656,9 +656,6 @@ def checkEnvironment():
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
os.environ['PATH'] = base_path
print("Setting default PATH: %s"%(os.environ['PATH']))
- # Ensure we have access to sphinx-build.
- # You may have to create a link in /usr/bin for it.
- runCommand('sphinx-build --version')
def parseOptions(args=None):
"""
@@ -1618,8 +1615,17 @@ def buildDMG():
if os.path.exists(outdir):
shutil.rmtree(outdir)
+ # We used to use the deployment target as the last characters of the
+ # installer file name. With the introduction of weaklinked installer
+ # variants, we may have two variants with the same file name, i.e.
+ # both ending in '10.9'. To avoid this, we now use the major/minor
+ # version numbers of the macOS version we are building on, i.e.
+ # '10.9' as before for 10.9+ variant, '11.0' for universal2 11.0-.
+ # it's not ideal but should cause the least disruption to packaging
+ # workflows.
+ build_system_version = '.'.join(platform.mac_ver()[0].split('.')[0:2])
imagepath = os.path.join(outdir,
- 'python-%s-macosx%s'%(getFullVersion(),DEPTARGET))
+ 'python-%s-macosx%s'%(getFullVersion(),build_system_version))
if INCLUDE_TIMESTAMP:
imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
imagepath = imagepath + '.dmg'