Kaydet (Commit) 4c99071c authored tarafından doko@ubuntu.com's avatar doko@ubuntu.com

- fix the OS X build failure, only try to remove the temporary file if it exists

üst 7f7902ce
...@@ -657,7 +657,7 @@ class PyBuildExt(build_ext): ...@@ -657,7 +657,7 @@ class PyBuildExt(build_ext):
ret = os.system("ldd %s > %s" % (do_readline, tmpfile)) ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
else: else:
ret = 256 ret = 256
if ret == 0: if ret >> 8 == 0:
with open(tmpfile) as fp: with open(tmpfile) as fp:
for ln in fp: for ln in fp:
if 'curses' in ln: if 'curses' in ln:
...@@ -669,7 +669,8 @@ class PyBuildExt(build_ext): ...@@ -669,7 +669,8 @@ class PyBuildExt(build_ext):
if 'tinfo' in ln: if 'tinfo' in ln:
readline_termcap_library = 'tinfo' readline_termcap_library = 'tinfo'
break break
os.unlink(tmpfile) if os.path.exists(tmpfile):
os.unlink(tmpfile)
# Issue 7384: If readline is already linked against curses, # Issue 7384: If readline is already linked against curses,
# use the same library for the readline and curses modules. # use the same library for the readline and curses modules.
if 'curses' in readline_termcap_library: if 'curses' in readline_termcap_library:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment