Description: use pkg-config to look up the python2 include paths.
 sysconfig.get_path("include") returns /usr/local/include/python2.7, which is
 not what we want
Author: Mattia Rizzolo <mattia@debian.org>
Forwarded: no
Last-Update: 2016-05-27

--- a/configure.ac
+++ b/configure.ac
@@ -104,7 +104,7 @@
 AM_CONDITIONAL([WITH_PYTHON], [test $with_python != no])
 if test $with_python != no ; then
    AM_PATH_PYTHON
-   PYINCLUDEDIR=`$PYTHON -c 'import sysconfig; print(sysconfig.get_path("include"))'`
+   PYINCLUDEDIR=`pkg-config --cflags-only-I python`
 fi
 AC_SUBST(PYINCLUDEDIR)
 
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@
 
 AM_CPPFLAGS = $(GOBJECT_CFLAGS)
 LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"'
-PYTHON_CPPFLAGS = -I$(PYINCLUDEDIR)
+PYTHON_CPPFLAGS = $(PYINCLUDEDIR)
 
 AM_TESTS_ENVIRONMENT = PYTHON=$(PYTHON); export PYTHON;
 # Ignore possibly lost, there are too many due to Python.  --gen-suppressions
