From 3951cb053b4d451fdb0580294fb78bc792b828da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 18 Dec 2018 15:05:52 +0100 Subject: [PATCH 1/2] When --with-python is given to configure, use default search list for python binaries instead of 'yes' --- configure | 8 +++++++- configure.ac | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 243431b414..6328aece5c 100755 --- a/configure +++ b/configure @@ -12180,12 +12180,14 @@ except: exit(1)' testply='try: import ply except: exit(1)' +default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" + # Check whether --with-python was given. if test "${with_python+set}" = set; then : withval=$with_python; else - with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" + with_python=$default_with_python fi @@ -12197,6 +12199,10 @@ else fi +if test "$with_python" = "yes"; then : + with_python=$default_with_python +fi + if test "$with_python" = "no"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python support" >&5 $as_echo_n "checking for Python support... " >&6; } diff --git a/configure.ac b/configure.ac index 33be9c8e47..df4e281490 100644 --- a/configure.ac +++ b/configure.ac @@ -191,15 +191,20 @@ except: exit(1)' testply='try: import ply except: exit(1)' +default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" + AC_ARG_WITH([python], AS_HELP_STRING([--with-python=PATH], [specify path to Python interpreter]), - [], [with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7"]) + [], [with_python=$default_with_python]) AC_ARG_WITH([python-install-dir], AS_HELP_STRING([--with-python-install-dir=PATH], [installation directory for Python modules]), [], with_python_install_dir="") +AS_IF([test "$with_python" = "yes"], + [with_python=$default_with_python]) + AS_IF([test "$with_python" = "no"], [AC_MSG_CHECKING([for Python support]) AC_MSG_RESULT([disabled])], From 99cf0faec0fb68165bae0aefef4ab25a35d1c465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 18 Dec 2018 15:09:24 +0100 Subject: [PATCH 2/2] Add some combinations of --with-python=/--with-python/--without-python to GitLab CI --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 379ee273d5..53d8555d50 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -258,6 +258,7 @@ clang:stretch:amd64:build: variables: CC: clang CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" + EXTRA_CONFIGURE: "--with-python=python3" <<: *debian_stretch_amd64_image <<: *build_job @@ -265,7 +266,7 @@ jessie:amd64:build: variables: CC: gcc CFLAGS: "-Wall -Wextra -O2 -g" - EXTRA_CONFIGURE: --without-cmocka + EXTRA_CONFIGURE: "--without-cmocka --with-python" <<: *debian_jessie_amd64_image <<: *build_job @@ -297,6 +298,7 @@ clang:stretch:i386:build: variables: CC: clang CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" + EXTRA_CONFIGURE: "--with-python=python2" <<: *debian_stretch_i386_image <<: *build_job @@ -304,7 +306,7 @@ sid:i386:build: variables: CC: gcc CFLAGS: "-Wall -Wextra -O2 -g" - EXTRA_CONFIGURE: "--with-libidn2" + EXTRA_CONFIGURE: "--with-libidn2 --without-python" <<: *debian_sid_i386_image <<: *build_job