Skip to content

Commit

Permalink
Prevent macOS installer build failure if ABIFLAGS is empty. (pythonGH…
Browse files Browse the repository at this point in the history
  • Loading branch information
ned-deily authored Apr 29, 2019
1 parent 883dfc6 commit 9bdd6d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Mac/BuildScript/build-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,8 @@ def buildPython():
if ln.startswith('VERSION='):
VERSION=ln.split()[1]
if ln.startswith('ABIFLAGS='):
ABIFLAGS=ln.split()[1]
ABIFLAGS=ln.split()
ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else ''
if ln.startswith('LDVERSION='):
LDVERSION=ln.split()[1]
fp.close()
Expand Down Expand Up @@ -1258,7 +1259,8 @@ def buildPython():
import pprint
if getVersionMajorMinor() >= (3, 6):
# XXX this is extra-fragile
path = os.path.join(path_to_lib, '_sysconfigdata_m_darwin_darwin.py')
path = os.path.join(path_to_lib,
'_sysconfigdata_%s_darwin_darwin.py' % (ABIFLAGS,))
else:
path = os.path.join(path_to_lib, '_sysconfigdata.py')
fp = open(path, 'r')
Expand Down

0 comments on commit 9bdd6d1

Please sign in to comment.