diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-09-01 17:45:44 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-09-01 18:40:40 +0200 |
commit | 979fec002ce8c7d9d4c82b762c0caa5da0beac77 (patch) | |
tree | 3ba7603e5a2f99c0250c2c7b37f21a07c4c6b6dd | |
parent | a1905bf5dbb1393acab7a835d42ec841dbf02783 (diff) | |
download | hardware_replicant_libsamsung-ipc-979fec002ce8c7d9d4c82b762c0caa5da0beac77.tar.gz hardware_replicant_libsamsung-ipc-979fec002ce8c7d9d4c82b762c0caa5da0beac77.tar.bz2 hardware_replicant_libsamsung-ipc-979fec002ce8c7d9d4c82b762c0caa5da0beac77.zip |
configure.ac: fix the python3 interpreter detection.
Guix system users need to use guix shell and the provided
scripts/manifest.scm to do local builds and testing.
However 'guix shell --container' doesn't have /usr/bin/env, so tests
don't work if we rely on what is in the sheebang (#!).
In various Makefile.am we had:
PY_LOG_COMPILER = $(PYTHON)
but PYTHON was undefined, so for some reasons that made 'make check'
rely on the sheebang instead of just using 'python'.
With this fix, with
'guix shell --pure --container -f scripts/manifest.scm',
./configure now properly detect the 'python3' that is in the path:
Interpreters paths:
PYTHON3..................: python3
And 'python3' is then used to run the python test scripts, which makes
then makes 'make check' succeed.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | samsung-ipc/tests/Makefile.am | 2 | ||||
-rw-r--r-- | tools/Makefile.am | 2 | ||||
-rw-r--r-- | tools/ipc-modem/Makefile.am | 2 |
4 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8dd7400..f53a55d 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,11 @@ AC_SUBST(OPENSSL_LIBS) AC_SUBST(STRICT_CFLAGS) #------------------------------------------------------------------------------ +# python +AC_SUBST(PYTHON3) +AC_CHECK_PROG([PYTHON3], [python3], [python3]) + +#------------------------------------------------------------------------------ # valgrind AC_SUBST(VALGRIND) @@ -133,6 +138,11 @@ echo echo " CFLAGS..................: $CFLAGS $STRICT_CFLAGS" echo echo +echo "Interpreters paths:" +echo +echo " PYTHON3..................: $PYTHON3" +echo +echo echo "Configuration Options:" echo echo " debug build.............: $debug" diff --git a/samsung-ipc/tests/Makefile.am b/samsung-ipc/tests/Makefile.am index 8a2e96e..494be9a 100644 --- a/samsung-ipc/tests/Makefile.am +++ b/samsung-ipc/tests/Makefile.am @@ -32,7 +32,7 @@ libsamsung_ipc_test_LDFLAGS = if WANT_VALGRIND_CHECKING AM_TESTS_ENVIRONMENT = VALGRIND='$(VALGRIND)'; export VALGRIND; endif -PY_LOG_COMPILER = $(PYTHON) +PY_LOG_COMPILER = $(PYTHON3) TEST_EXTENSIONS = .py TESTS = libsamsung-ipc-test.py EXTRA_DIST += $(TESTS) diff --git a/tools/Makefile.am b/tools/Makefile.am index 3183499..911ea30 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -22,7 +22,7 @@ bin_PROGRAMS = \ if WANT_VALGRIND_CHECKING AM_TESTS_ENVIRONMENT = VALGRIND='$(VALGRIND)'; export VALGRIND; endif -PY_LOG_COMPILER = $(PYTHON) +PY_LOG_COMPILER = $(PYTHON3) TEST_EXTENSIONS = .py TESTS = \ tests/nv_data-imei.py \ diff --git a/tools/ipc-modem/Makefile.am b/tools/ipc-modem/Makefile.am index cd9fc2b..efced7e 100644 --- a/tools/ipc-modem/Makefile.am +++ b/tools/ipc-modem/Makefile.am @@ -13,7 +13,7 @@ bin_PROGRAMS = ipc-modem # TODO: Find a way to make test more modular and represent each run of the # ipc-modem in TEST while having it implemented in a single python file -PY_LOG_COMPILER = $(PYTHON) +PY_LOG_COMPILER = $(PYTHON3) TEST_EXTENSIONS = .py TESTS = tests/ipc-modem.py EXTRA_DIST += $(TESTS) |