Commit cb9d55de6e8c3eadcaee3d44e490dea1ffa2f94c
1 parent
0fa8ecd4
Distutils takes precedence over sysconfig (otherwise there is an issue on Ubuntu)
Showing
1 changed file
with
8 additions
and
7 deletions
configure.ac
... | ... | @@ -712,12 +712,13 @@ else |
712 | 712 | if test -z "$ac_sysconfig_result" || test -z "$ac_distutils_result"; then |
713 | 713 | |
714 | 714 | # Get Python path |
715 | - if test -z "$ac_sysconfig_result"; then | |
716 | - python_path=`$PYTHON -c "import sysconfig; \ | |
717 | - print(sysconfig.get_paths()[['include']]);"` | |
718 | - else | |
715 | + if test -z "$ac_distutils_result"; then | |
719 | 716 | python_path=`$PYTHON -c "import distutils.sysconfig; \ |
720 | 717 | print(distutils.sysconfig.get_python_inc());"` |
718 | + | |
719 | + else | |
720 | + python_path=`$PYTHON -c "import sysconfig; \ | |
721 | + print(sysconfig.get_paths()[['include']]);"` | |
721 | 722 | fi |
722 | 723 | if test -n "${python_path}"; then |
723 | 724 | SAVED_CPPFLAGS="$CPPFLAGS" |
... | ... | @@ -734,11 +735,11 @@ else |
734 | 735 | # to this value as otherwise we get trouble with name mangling (that changed) |
735 | 736 | if [test "x$osx_mavericks" = "xyes"]; then |
736 | 737 | AC_MSG_CHECKING([Python MACOSX_DEPLOYMENT_TARGET]) |
737 | - if test -z "$ac_sysconfig_result"; then | |
738 | - python_target=`$PYTHON -c "import sysconfig; \ | |
738 | + if test -z "$ac_distutils_result"; then | |
739 | + python_target=`$PYTHON -c "from distutils import sysconfig; \ | |
739 | 740 | print(sysconfig.get_config_vars()[['MACOSX_DEPLOYMENT_TARGET']]);" 2> /dev/null` |
740 | 741 | else |
741 | - python_target=`$PYTHON -c "from distutils import sysconfig; \ | |
742 | + python_target=`$PYTHON -c "import sysconfig; \ | |
742 | 743 | print(sysconfig.get_config_vars()[['MACOSX_DEPLOYMENT_TARGET']]);" 2> /dev/null` |
743 | 744 | fi |
744 | 745 | python_compact_target=`echo $python_target | sed 's/\(10\.[[0-9]]*\).*/\1/' | sed -e 's/\.//g'` | ... | ... |