The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1036

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Looks like it's a bug in Debian or Ubuntu Python/setuptools patches.
When `--install-layout=deb` is passed to `setup.py`, setuptools don't generate stub helpers for loading extensions from .egg files. The same command without --install-layout works as expected.

However, it could simply be an unsupported configuration, because distro packages should be built with `--single-version-externally-managed`, which prevents .egg builds.

So, I assume setuptools builds will be used for distro packages. Then the fix is very simple: always pass `--root=` to `setup.py`, even when `DESTDIR` isn't set. As `--root` implies `--single-version-externally-managed`.
From 371cffc37af4e7af67bad4430d8535c09410a748 Mon Sep 17 00:00:00 2001
From: Aleksandr Mezin <mezin.alexan...@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.alexan...@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.alexan...@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.alexan...@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
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to