[pygobject] configure.ac: Fix PYTHON_SO with Python3.3



commit 266e389ff90d982151bae3ac22b9b8b0739f520f
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Apr 13 17:28:26 2013 +0200

    configure.ac: Fix PYTHON_SO with Python3.3
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696646

 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/configure.ac b/configure.ac
index bdd11b2..2458975 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,7 +111,10 @@ if test $build_py3k = true ; then
                          [AC_MSG_ERROR(too old)])
 fi
 
-PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; 
sys.stdout.write(distutils.sysconfig.get_config_var('SO'));"`
+# - 'SO' for PyPy, CPython 2.7-3.2
+# - 'EXT_SUFFIX' for CPython3.3+ (http://bugs.python.org/issue16754)
+# - fallback to '.so'
+PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var; 
sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.so');"`
 AC_SUBST(PYTHON_SO)
 
 AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))


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