aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-09-01 17:45:44 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2023-02-17 17:59:49 +0100
commit779a4a63f94279eae6cb09475d777990fd9ceae6 (patch)
tree414dc9a7e16e206e82c088c7df4d6448b7346c68
parent2214aec2f359c60fa48bafe160977c14ff3c0251 (diff)
downloadhardware_replicant_libsamsung-ipc-779a4a63f94279eae6cb09475d777990fd9ceae6.tar.gz
hardware_replicant_libsamsung-ipc-779a4a63f94279eae6cb09475d777990fd9ceae6.tar.bz2
hardware_replicant_libsamsung-ipc-779a4a63f94279eae6cb09475d777990fd9ceae6.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.ac10
-rw-r--r--samsung-ipc/tests/Makefile.am2
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/ipc-modem/Makefile.am2
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)