mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-29 19:41:52 +03:00
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user