From 0b9867f3abdd1d7bf914d6024e9274fd31b28d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gavin=20Lai=20=28=E8=B3=B4=E5=BB=BA=E5=AE=87=29?= Date: Tue, 27 Aug 2024 22:35:02 +0800 Subject: [PATCH] bindings: python: byte compile by python3-all versions Forwarded: not-needed Last-Update: 2024-02-25 This patch ensures this package is compatible with the Python versions in python3-all. Before this patch, there will be an import error for the Python version, which is not installed in the python3 package. Last-Update: 2024-02-25 Gbp-Pq: Name python3-all-versions-byte-compile --- bindings/python/Makefile.am | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index 61d82c5..5534705 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -12,14 +12,22 @@ BUILD_TESTS = 1 endif all-local: - GPIOD_WITH_TESTS=$(BUILD_TESTS) \ - $(PYTHON) setup.py build_ext --inplace \ - --include-dirs=$(top_srcdir)/include/:$(top_srcdir)/tests/gpiosim/ \ - --library-dirs=$(top_builddir)/lib/.libs/:$(top_srcdir)/tests/gpiosim/.libs/ + @PYTHON_VERSIONS=$$(py3versions -s); \ + for py in $$PYTHON_VERSIONS; do \ + echo "Using $$py for building..."; \ + GPIOD_WITH_TESTS=$(BUILD_TESTS) \ + $$py setup.py build_ext --inplace \ + --include-dirs=$(top_srcdir)/include/:$(top_srcdir)/tests/gpiosim/ \ + --library-dirs=$(top_builddir)/lib/.libs/:$(top_srcdir)/tests/gpiosim/.libs/; \ + done install-exec-local: - GPIOD_WITH_TESTS= \ - $(PYTHON) setup.py install --root=$(if $(DESTDIR),$(DESTDIR),/) --prefix=$(prefix) + @PYTHON_VERSIONS=$$(py3versions -s); \ + for py in $$PYTHON_VERSIONS; do \ + echo "Using $$py for building..."; \ + GPIOD_WITH_TESTS= \ + $$py setup.py install --root=$(if $(DESTDIR),$(DESTDIR),/) --prefix=$(prefix); \ + done SUBDIRS = gpiod -- 2.30.2