[packages/rpm-pld-macros] - use python2 when python 2.x is expected

qboosh qboosh at pld-linux.org
Sun May 19 11:31:45 CEST 2024


commit 9752bf6d8fbbd1a67c20d78e14733a06afcf21e0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 19 11:32:23 2024 +0200

    - use python2 when python 2.x is expected

 macros.python | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/macros.python b/macros.python
index 2845691..b74bf85 100644
--- a/macros.python
+++ b/macros.python
@@ -15,9 +15,9 @@
 %py_dyndir		%{py_libdir}/lib-dynload
 
 # pure python modules compilation
-%py_comp		python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
+%py_comp		%{__python} -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
 
-%py_ocomp		python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
+%py_ocomp		%{__python} -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
 
 # Software written in Python language require Python with main version
 %pyrequires_eq() Requires:	%1
@@ -156,7 +156,7 @@ done \
 %py_lint() \
 __py_lint() { \
 %{!?debug:set +x;} \
-find "$@" -type f -name '*.py' | python -c ' \
+find "$@" -type f -name '*.py' | %{__python} -c ' \
 import sys \
 import compiler \
 \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/9752bf6d8fbbd1a67c20d78e14733a06afcf21e0



More information about the pld-cvs-commit mailing list