python2/python-2.5.1-binutils-no-dep.patch
James Antill 59062c044b - Fix pyconfig.h comment typo.
- Add back test_support.py and the __init__.py file.
- Resolves: rhbz#387401
2007-11-30 05:31:41 +00:00

22 lines
956 B
Diff

diff -rup Python-2.5.1-orig/Lib/ctypes/util.py Python-2.5.1/Lib/ctypes/util.py
--- Python-2.5.1-orig/Lib/ctypes/util.py 2007-01-17 14:53:24.000000000 -0500
+++ Python-2.5.1/Lib/ctypes/util.py 2007-10-24 11:06:12.000000000 -0400
@@ -71,9 +71,13 @@ elif os.name == "posix":
if not f:
return None
cmd = "objdump -p -j .dynamic 2>/dev/null " + f
- res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+ try:
+ res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+ except:
+ res = None
if not res:
- return None
+ return os.path.basename(f) # This is good for GLibc, I think, and a
+ # dep on binutils is big (for live CDs).
return res.group(1)
if (sys.platform.startswith("freebsd")
Only in Python-2.5.1/Lib/ctypes: util.py~
Only in Python-2.5.1/Lib/ctypes: util.py.binutils-no-dep