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