File pam-python3-user-specified-python.patch of Package pam-python3

---
 src/Makefile |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Index: pam-python3-1.0.7+git.20220331.9641aa5/src/Makefile
===================================================================
--- pam-python3-1.0.7+git.20220331.9641aa5.orig/src/Makefile
+++ pam-python3-1.0.7+git.20220331.9641aa5/src/Makefile
@@ -3,14 +3,15 @@ all:	ctest pam_python3.so test-pam_pytho
 WARNINGS=-Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror
 #WARNINGS=-Wunreachable-code 	# Gcc 4.1 .. 4.4 are too buggy to make this useful
 
+PYTHON_EXEC ?= python3
 LIBDIR ?= /lib/security
 
 pam_python3.so: pam_python.c setup.py Makefile
 	@rm -f "$@"
 	@[ ! -e build -o build/lib.*/$@ -nt setup.py -a build/lib.*/$@ -nt Makefile ] || rm -r build
-	CFLAGS="$(WARNINGS)" python3 ./setup.py build
-	@#CFLAGS="-O0 $(WARNINGS)" python3 ./setup.py build --debug
-	@#CFLAGS="-O0 $(WARNINGS)" Py_DEBUG=1 python3 ./setup.py build --debug
+	CFLAGS="$(WARNINGS)" $(PYTHON_EXEC) ./setup.py build
+	@#CFLAGS="-O0 $(WARNINGS)" $(PYTHON_EXEC) ./setup.py build --debug
+	@#CFLAGS="-O0 $(WARNINGS)" Py_DEBUG=1 $(PYTHON_EXEC) ./setup.py build --debug
 	ln -sf build/lib.*/pam_python3.*.so pam_python3.so
 
 .PHONY: install install-lib
@@ -38,7 +39,7 @@ test-pam_python.pam: test-pam_python.pam
 
 .PHONY: test
 test: pam_python3.so ctest /etc/pam.d/test-pam_python.pam
-	python3 test.py
+	$(PYTHON_EXEC) test.py
 	./ctest
 
 test-pam_python-installed.pam: test-pam_python.pam.in Makefile
@@ -50,5 +51,5 @@ test-pam_python-installed.pam: test-pam_
 
 .PHONY: installed-test
 installed-test: ctest /etc/pam.d/test-pam_python-installed.pam
-	python3 test.py
+	$(PYTHON_EXEC) test.py
 	./ctest
openSUSE Build Service is sponsored by