contrib/packaging/buildrpm
branchstable
changeset 43342 a6dcac6454c1
parent 43340 e0812b032bcc
child 43344 825f8f42333a
--- a/contrib/packaging/buildrpm	Sun Oct 27 21:40:21 2019 +0100
+++ b/contrib/packaging/buildrpm	Sun Oct 27 21:28:26 2019 +0100
@@ -11,6 +11,7 @@
 
 BUILD=1
 RPMBUILDDIR="$PWD/rpmbuild"
+PYTHONEXE=python2
 
 while [ "$1" ]; do
     case "$1" in
@@ -18,6 +19,10 @@
         shift
         BUILD=
         ;;
+    --python3)
+        shift
+        PYTHONEXE=python3
+        ;;
     --withpython | --with-python)
         shift
         PYTHONVER=2.7.16
@@ -96,6 +101,7 @@
 
 sed -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
+    -e "s/^%global pythonexe .*/%global pythonexe $PYTHONEXE/" \
     $specfile > $rpmspec
 
 echo >> $rpmspec