[lxc-devel] [lxc/master] python-lxc: follow global rpath setting for autotools builds

GreatFruitOmsk on Github lxc-bot at linuxcontainers.org
Mon Jun 6 01:56:32 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 526 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160606/8026ebd1/attachment.bin>
-------------- next part --------------
From 2c500c107acf9b9e90d3d190c940a3c4660bce85 Mon Sep 17 00:00:00 2001
From: Aleksandr Mezin <mezin.alexander at gmail.com>
Date: Mon, 6 Jun 2016 07:50:59 +0600
Subject: [PATCH] python-lxc: follow global rpath setting for autotools builds

When LXC is configured with --enable-rpath, I expect Python bindings
to be able to find the library in a non-standard location, just like
LXC command-line tools.

Signed-off-by: Aleksandr Mezin <mezin.alexander at gmail.com>
---
 src/python-lxc/Makefile.am | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
index b4c21a8..05a5738 100644
--- a/src/python-lxc/Makefile.am
+++ b/src/python-lxc/Makefile.am
@@ -6,10 +6,16 @@ else
     DISTSETUPOPTS=
 endif
 
+if ENABLE_RPATH
+    RPATHOPTS=-R $(libdir)
+else
+    RPATHOPTS=
+endif
+
 CALL_SETUP_PY := cd @srcdir@ && $(PYTHON) setup.py build -b @abs_builddir@/build egg_info -e @abs_builddir@
 
 all:
-	$(CALL_SETUP_PY) build_ext -I @abs_top_srcdir@/src -L @abs_top_builddir@/src/lxc --no-pkg-config
+	$(CALL_SETUP_PY) build_ext -I @abs_top_srcdir@/src -L @abs_top_builddir@/src/lxc $(RPATHOPTS) --no-pkg-config
 
 DESTDIR = / # default
 


More information about the lxc-devel mailing list