--- a/configure.ac +++ b/configure.ac @@ -1865,24 +1865,12 @@ then if test "$python3_has_distutils" != "no" ; then AC_MSG_CHECKING([location of python3 site-packages]) - PYTHON3_SITE_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`" - if test -z "$PYTHON3_SITE_DIR" ; then AC_MSG_ERROR([Unable to detect python3 site-packages path]) - elif test ! -d "$PYTHON3_SITE_DIR" ; then - AC_MSG_ERROR([Path $PYTHON3_SITE_DIR returned by python3 does not exist!]) fi AC_MSG_RESULT([$PYTHON3_SITE_DIR]) AC_SUBST([PYTHON3_SITE_DIR], [$PYTHON3_SITE_DIR]) - # - # python3 distutils found, get settings from python3 directly - # - PYTHON3_CFLAGS="`$PYTHON3 -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`" - PYTHON3_LDFLAGS="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]); print(\" \".join(libs));'`" - PYTHON3_LIB="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); print(\"python\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]);'`" - PYTHON3_LIBDIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`" - # handle python3 being installed into /usr/local AC_MSG_CHECKING([python3 libdir]) if test -z "`echo $PYTHON3_LIBDIR | grep "/usr/lib"`" ; then