--- a/configure.ac +++ b/configure.ac @@ -1876,36 +1876,24 @@ then fi AC_MSG_RESULT([$PYTHON3_VER]) - AC_MSG_CHECKING([for python3 distutils]) - python3_result="`$PYTHON3 -c 'import distutils;' 2>&1`" - if test -z "$python3_result" ; then + #AC_MSG_CHECKING([for python3 distutils]) + #python3_result="`$PYTHON3 -c 'import distutils;' 2>&1`" + #if test -z "$python3_result" ; then python3_has_distutils="yes" - else - python3_has_distutils="no" - fi - AC_MSG_RESULT([$python3_has_distutils]) + #else + # python3_has_distutils="no" + #fi + #AC_MSG_RESULT([$python3_has_distutils]) 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