Blame SOURCES/00191-add-RPATH-to-elementtree.patch

ae2451
diff -up Python-2.7.5/setup.py.orig Python-2.7.5/setup.py
ae2451
--- Python-2.7.5/setup.py.orig	2013-11-07 01:36:18.853604232 +0100
ae2451
+++ Python-2.7.5/setup.py	2013-11-07 01:39:22.163305821 +0100
ae2451
@@ -1483,6 +1483,9 @@ class PyBuildExt(build_ext):
ae2451
         # Fredrik Lundh's cElementTree module.  Note that this also
ae2451
         # uses expat (via the CAPI hook in pyexpat).
ae2451
 
ae2451
+        # Add an explicit RPATH to _elementtree.so (rhbz#1019345)
ae2451
+        EXPAT_RPATH = '/usr/lib64' if sys.maxint == 0x7fffffffffffffff else '/usr/lib'
ae2451
+
ae2451
         if os.path.isfile(os.path.join(srcdir, 'Modules', '_elementtree.c')):
ae2451
             define_macros.append(('USE_PYEXPAT_CAPI', None))
ae2451
             exts.append(Extension('_elementtree',
ae2451
@@ -1492,6 +1495,7 @@ class PyBuildExt(build_ext):
ae2451
                                   sources = ['_elementtree.c'],
ae2451
                                   depends = ['pyexpat.c'] + expat_sources +
ae2451
                                       expat_depends,
ae2451
+                                  extra_link_args = ['-Wl,-rpath,%s' % EXPAT_RPATH]
ae2451
                                   ))
ae2451
         else:
ae2451
             missing.append('_elementtree')