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

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