[lxc-devel] [lxc/master] python-lxc: fix breakage caused by the switch to setuptools

GreatFruitOmsk on Github lxc-bot at linuxcontainers.org
Tue May 31 11:55:44 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 960 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160531/06d0bde4/attachment.bin>
-------------- next part --------------
From 371cffc37af4e7af67bad4430d8535c09410a748 Mon Sep 17 00:00:00 2001
From: Aleksandr Mezin <mezin.alexander at gmail.com>
Date: Tue, 31 May 2016 17:33:59 +0600
Subject: [PATCH 1/2] python-lxc: always set --root for install command

This implies '--single-version-externally-managed', which we
actually want for autotools builds.

Fixes current problems with jenkins test suite.

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

diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
index 4a2b86e..2d7ae07 100644
--- a/src/python-lxc/Makefile.am
+++ b/src/python-lxc/Makefile.am
@@ -6,18 +6,15 @@ else
     DISTSETUPOPTS=
 endif
 
-INSTALL_OPTS := install --prefix=$(prefix) --no-compile $(DISTSETUPOPTS)
 CALL_SETUP_PY := cd @srcdir@ && $(PYTHON) setup.py build -b @abs_builddir@/build
 
 all:
 	$(CALL_SETUP_PY) build_ext -I @abs_top_srcdir@/src -L @abs_top_builddir@/src/lxc --no-pkg-config
 
+DESTDIR = / # default
+
 install:
-	if [ -z "$(DESTDIR)" ]; then \
-		$(CALL_SETUP_PY) $(INSTALL_OPTS); \
-	else \
-		$(CALL_SETUP_PY) $(INSTALL_OPTS) --root=$(DESTDIR); \
-	fi
+	$(CALL_SETUP_PY) install --prefix=$(prefix) --no-compile $(DISTSETUPOPTS) --root=$(DESTDIR)
 
 clean-local:
 	rm -rf @builddir@/build

From 0e586abd44259afb501b32a288fe001cd3d858b9 Mon Sep 17 00:00:00 2001
From: Aleksandr Mezin <mezin.alexander at gmail.com>
Date: Tue, 31 May 2016 17:36:23 +0600
Subject: [PATCH 2/2] python-lxc: put egg-info into build directory

To keep source directory clean.

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

diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
index 2d7ae07..b4c21a8 100644
--- a/src/python-lxc/Makefile.am
+++ b/src/python-lxc/Makefile.am
@@ -6,7 +6,7 @@ else
     DISTSETUPOPTS=
 endif
 
-CALL_SETUP_PY := cd @srcdir@ && $(PYTHON) setup.py build -b @abs_builddir@/build
+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


More information about the lxc-devel mailing list