[lxc-devel] [PATCH] fix python import error: no module named 'lxc'

Sheng Yong shyodx at gmail.com
Fri Apr 4 13:52:56 UTC 2014


For some distro, the default prefix of lxc is /usr/local, while that of
python is /usr. If the prefix of module installation is specified, python
may not find the path of lxc module. So do not set prefix of lxc module
to use default value.

Signed-off-by: Sheng Yong <shyodx at gmail.com>
---
 src/python-lxc/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
index b1c10b5..8676823 100644
--- a/src/python-lxc/Makefile.am
+++ b/src/python-lxc/Makefile.am
@@ -11,9 +11,9 @@ all:
 
 install:
 	if [ "$(DESTDIR)" = "" ]; then \
-		$(PYTHON) setup.py install --prefix=$(prefix) --no-compile $(DISTSETUPOPTS); \
+		$(PYTHON) setup.py install --no-compile $(DISTSETUPOPTS); \
 	else \
-		$(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix) --no-compile $(DISTSETUPOPTS); \
+		$(PYTHON) setup.py install --root=$(DESTDIR) --no-compile $(DISTSETUPOPTS); \
 	fi
 
 clean-local:
-- 
1.9.1



More information about the lxc-devel mailing list