From 6d1c8a436dc5b543ba2ad56b453a34ce43d9ba14 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 6 Dec 2009 16:05:33 +0100 Subject: Use AM_PATH_PYTHON and python-config to detect Python configuration Using AM_PATH_PYTHON solves the site-packages directory problem. At least in Ubuntu with Python 2.6 and later site-packages is renamed to dist-packages and site-packages is not part of sys.path anymore. So installing the libvirt Python bindings to site-packages renders them unusable, because they can be imported from there without manually including site-packages into sys.path. AM_PATH_PYTHON detects the correct site-packages/dist-packages directory. python-config --includes gives the correct include path for the Python header files. The old probing code stays there as fallback mechanism. * configure.in: use AM_PATH_PYTHON and python-config * python/Makefile.am: remove -I because PYTHON_INCLUDES contains it now --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index cda6559..736631e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS= . tests INCLUDES = \ $(WARN_CFLAGS) \ - -I$(PYTHON_INCLUDES) \ + $(PYTHON_INCLUDES) \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_builddir)/$(subdir) -- cgit