[pygobject] Use distutils.sysconfig to retrieve the python include path.



commit f82f755a0f419539c223e4a74e33145726c6e69f
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Thu Apr 4 09:05:48 2013 +0200

    Use distutils.sysconfig to retrieve the python include path.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696648

 m4/python.m4 |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/m4/python.m4 b/m4/python.m4
index 7e10bc0..11d966d 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -48,12 +48,8 @@ if test "x$PYTHON_INCLUDES" = x; then
   if test -x "$PYTHON_CONFIG"; then
     PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
   else
-    py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
-    py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
-    PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-    if test "$py_prefix" != "$py_exec_prefix"; then
-      PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-    fi
+    PYTHON_INCLUDES=`$PYTHON -c "import distutils.sysconfig, sys; 
sys.stdout.write(distutils.sysconfig.get_python_inc(True))"`
+    PYTHON_INCLUDES="-I$PYTHON_INCLUDES"
   fi
 fi
 AC_SUBST(PYTHON_INCLUDES)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]