Skip to content

Commit 9bdd6d1

Browse files
authored
Prevent macOS installer build failure if ABIFLAGS is empty. (GH-13012)
1 parent 883dfc6 commit 9bdd6d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Mac/BuildScript/build-installer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,8 @@ def buildPython():
12071207
if ln.startswith('VERSION='):
12081208
VERSION=ln.split()[1]
12091209
if ln.startswith('ABIFLAGS='):
1210-
ABIFLAGS=ln.split()[1]
1210+
ABIFLAGS=ln.split()
1211+
ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else ''
12111212
if ln.startswith('LDVERSION='):
12121213
LDVERSION=ln.split()[1]
12131214
fp.close()
@@ -1258,7 +1259,8 @@ def buildPython():
12581259
import pprint
12591260
if getVersionMajorMinor() >= (3, 6):
12601261
# XXX this is extra-fragile
1261-
path = os.path.join(path_to_lib, '_sysconfigdata_m_darwin_darwin.py')
1262+
path = os.path.join(path_to_lib,
1263+
'_sysconfigdata_%s_darwin_darwin.py' % (ABIFLAGS,))
12621264
else:
12631265
path = os.path.join(path_to_lib, '_sysconfigdata.py')
12641266
fp = open(path, 'r')

0 commit comments

Comments
 (0)