Commit 148b0798ea2deffe700164db1e73a5362cf238b6
1 parent
84eda2c7
Distutils takes precedence over sysconfig (otherwise there is an issue on Ubuntu)
Showing
1 changed file
with
7 additions
and
7 deletions
configure.ac
... | ... | @@ -951,12 +951,12 @@ else |
951 | 951 | if test -z "$ac_sysconfig_result" || test -z "$ac_distutils_result"; then |
952 | 952 | |
953 | 953 | # Get Python path |
954 | - if test -z "$ac_sysconfig_result"; then | |
955 | - python_path=`$PYTHON -c "import sysconfig; \ | |
956 | - print(sysconfig.get_paths()[['include']]);"` | |
957 | - else | |
954 | + if test -z "$ac_distutils_result"; then | |
958 | 955 | python_path=`$PYTHON -c "import distutils.sysconfig; \ |
959 | 956 | print(distutils.sysconfig.get_python_inc());"` |
957 | + else | |
958 | + python_path=`$PYTHON -c "import sysconfig; \ | |
959 | + print(sysconfig.get_paths()[['include']]);"` | |
960 | 960 | fi |
961 | 961 | if test -n "${python_path}"; then |
962 | 962 | SAVED_CPPFLAGS="$CPPFLAGS" |
... | ... | @@ -974,11 +974,11 @@ else |
974 | 974 | # changed from Mac OS X 10.9 on. |
975 | 975 | if [test "x$osx_mavericks" = "xyes"]; then |
976 | 976 | AC_MSG_CHECKING([Python MACOSX_DEPLOYMENT_TARGET]) |
977 | - if test -z "$ac_sysconfig_result"; then | |
978 | - python_target=`$PYTHON -c "import sysconfig; \ | |
977 | + if test -z "$ac_distutils_result"; then | |
978 | + python_target=`$PYTHON -c "from distutils import sysconfig; \ | |
979 | 979 | print(sysconfig.get_config_vars()[['MACOSX_DEPLOYMENT_TARGET']]);" 2> /dev/null` |
980 | 980 | else |
981 | - python_target=`$PYTHON -c "from distutils import sysconfig; \ | |
981 | + python_target=`$PYTHON -c "import sysconfig; \ | |
982 | 982 | print(sysconfig.get_config_vars()[['MACOSX_DEPLOYMENT_TARGET']]);" 2> /dev/null` |
983 | 983 | fi |
984 | 984 | python_compact_target=`echo $python_target | sed 's/\(10\.[[0-9]]*\).*/\1/' | sed -e 's/\.//g'` | ... | ... |