summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2012-06-30 21:28:09 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2012-06-30 21:28:09 (GMT)
commit4c99071c9be1cf81e915ebfcb17dcf50c6e489d6 (patch)
tree5b0fb4620be4bf875a380e712f54060e4327c083 /setup.py
parent7f7902ce9c626021705b4c54677f64d2513e4d4c (diff)
downloadcpython-4c99071c9be1cf81e915ebfcb17dcf50c6e489d6.zip
cpython-4c99071c9be1cf81e915ebfcb17dcf50c6e489d6.tar.gz
cpython-4c99071c9be1cf81e915ebfcb17dcf50c6e489d6.tar.bz2
- fix the OS X build failure, only try to remove the temporary file if it exists
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index c1d6968..fa7bf2e 100644
--- a/setup.py
+++ b/setup.py
@@ -657,7 +657,7 @@ class PyBuildExt(build_ext):
ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
else:
ret = 256
- if ret == 0:
+ if ret >> 8 == 0:
with open(tmpfile) as fp:
for ln in fp:
if 'curses' in ln:
@@ -669,7 +669,8 @@ class PyBuildExt(build_ext):
if 'tinfo' in ln:
readline_termcap_library = 'tinfo'
break
- os.unlink(tmpfile)
+ if os.path.exists(tmpfile):
+ os.unlink(tmpfile)
# Issue 7384: If readline is already linked against curses,
# use the same library for the readline and curses modules.
if 'curses' in readline_termcap_library: