diff options
author | Bohuslav Kabrda <bkabrda@redhat.com> | 2014-12-12 11:04:40 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-13 10:25:37 +0100 |
commit | 341a00311680a440d7f979f06c34c70d86c9367a (patch) | |
tree | 95fdcbed6ddffb50958174c42157ceecaa06ac66 /src/external/python.m4 | |
parent | faae3d55e5cf416f16158d3b9f8c8fd475ac6acf (diff) | |
download | sssd-341a00311680a440d7f979f06c34c70d86c9367a.tar.gz sssd-341a00311680a440d7f979f06c34c70d86c9367a.tar.xz sssd-341a00311680a440d7f979f06c34c70d86c9367a.zip |
Python3 support in SSSD
https://fedorahosted.org/sssd/ticket/2017
Diffstat (limited to 'src/external/python.m4')
-rw-r--r-- | src/external/python.m4 | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/external/python.m4 b/src/external/python.m4 index b5d05e49e..25fc7f397 100644 --- a/src/external/python.m4 +++ b/src/external/python.m4 @@ -13,14 +13,14 @@ dnl versions of python AC_MSG_CHECKING([for working python]) if test -x "$PYTHON"; then PYTHON_CFLAGS="`$PYTHON -c \"from distutils import sysconfig; \ - print '-I' + sysconfig.get_python_inc() + \ + print('-I' + sysconfig.get_python_inc() + \ ' -I' + sysconfig.get_python_inc(plat_specific=True) + ' ' + \ - sysconfig.get_config_var('BASECFLAGS')\"`" + sysconfig.get_config_var('BASECFLAGS'))\"`" PYTHON_LIBS="`$PYTHON -c \"from distutils import sysconfig; \ - print \\\" \\\".join(sysconfig.get_config_var('LIBS').split() + \ + print(' '.join(sysconfig.get_config_var('LIBS').split() + \ sysconfig.get_config_var('SYSLIBS').split()) + \ - ' -lpython' + sysconfig.get_config_var('VERSION') + \ - ' -L' + sysconfig.get_config_var('LIBDIR')\"`" + ' ' + sysconfig.get_config_var('BLDLIBRARY') + ' ' + \ + ' -L' + sysconfig.get_config_var('LIBDIR'))\"`" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -37,12 +37,9 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS], AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES - py_prefix=`$PYTHON -c "import sys; print sys.prefix"` - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi + py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"` + py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"` + PYTHON_INCLUDES=-I`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` AC_SUBST(PYTHON_INCLUDES) |