Blame SOURCES/00187-add-RPATH-to-pyexpat.patch
|
|
556498 |
diff -r e8b8279ca118 setup.py
|
|
|
556498 |
--- a/setup.py Sun Jul 21 21:57:52 2013 -0400
|
|
|
556498 |
+++ b/setup.py Tue Aug 20 09:45:31 2013 +0200
|
|
|
556498 |
@@ -1480,12 +1480,21 @@
|
|
|
556498 |
'expat/xmltok_impl.h'
|
|
|
556498 |
]
|
|
|
556498 |
|
|
|
556498 |
+ # Add an explicit RPATH to pyexpat.so pointing at the directory
|
|
|
556498 |
+ # containing the system expat (which has the extra XML_SetHashSalt
|
|
|
556498 |
+ # symbol), to avoid an ImportError with a link error if there's an
|
|
|
556498 |
+ # LD_LIBRARY_PATH containing a "vanilla" build of expat (without the
|
|
|
556498 |
+ # symbol) (rhbz#833271):
|
|
|
556498 |
+ EXPAT_RPATH = '/usr/lib64' if sys.maxint == 0x7fffffffffffffff else '/usr/lib'
|
|
|
556498 |
+
|
|
|
556498 |
+
|
|
|
556498 |
exts.append(Extension('pyexpat',
|
|
|
556498 |
define_macros = define_macros,
|
|
|
556498 |
include_dirs = expat_inc,
|
|
|
556498 |
libraries = expat_lib,
|
|
|
556498 |
sources = ['pyexpat.c'] + expat_sources,
|
|
|
556498 |
depends = expat_depends,
|
|
|
556498 |
+ extra_link_args = ['-Wl,-rpath,%s' % EXPAT_RPATH]
|
|
|
556498 |
))
|
|
|
556498 |
|
|
|
556498 |
# Fredrik Lundh's cElementTree module. Note that this also
|