Skip to content

Commit 936533c

Browse files
authored
bpo-41100: minor build installer fixes (GH-23480)
1 parent 989af25 commit 936533c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Mac/BuildScript/build-installer.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ def checkEnvironment():
587587
Check that we're running on a supported system.
588588
"""
589589

590-
if sys.version_info[0:2] < (2, 5):
591-
fatal("This script must be run with Python 2.5 (or later)")
590+
if sys.version_info[0:2] < (2, 7):
591+
fatal("This script must be run with Python 2.7 (or later)")
592592

593593
if platform.system() != 'Darwin':
594594
fatal("This script should be run on a macOS 10.5 (or later) system")
@@ -656,9 +656,6 @@ def checkEnvironment():
656656
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
657657
os.environ['PATH'] = base_path
658658
print("Setting default PATH: %s"%(os.environ['PATH']))
659-
# Ensure we have access to sphinx-build.
660-
# You may have to create a link in /usr/bin for it.
661-
runCommand('sphinx-build --version')
662659

663660
def parseOptions(args=None):
664661
"""
@@ -1618,8 +1615,17 @@ def buildDMG():
16181615
if os.path.exists(outdir):
16191616
shutil.rmtree(outdir)
16201617

1618+
# We used to use the deployment target as the last characters of the
1619+
# installer file name. With the introduction of weaklinked installer
1620+
# variants, we may have two variants with the same file name, i.e.
1621+
# both ending in '10.9'. To avoid this, we now use the major/minor
1622+
# version numbers of the macOS version we are building on, i.e.
1623+
# '10.9' as before for 10.9+ variant, '11.0' for universal2 11.0-.
1624+
# it's not ideal but should cause the least disruption to packaging
1625+
# workflows.
1626+
build_system_version = '.'.join(platform.mac_ver()[0].split('.')[0:2])
16211627
imagepath = os.path.join(outdir,
1622-
'python-%s-macosx%s'%(getFullVersion(),DEPTARGET))
1628+
'python-%s-macosx%s'%(getFullVersion(),build_system_version))
16231629
if INCLUDE_TIMESTAMP:
16241630
imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
16251631
imagepath = imagepath + '.dmg'

0 commit comments

Comments
 (0)