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