Mercurial > hg
diff contrib/packaging/buildrpm @ 45983:97205cf0ee4d
packaging: don't use plain 'python' if another python has been specified
Before this change, packaging on CentOS 8 failed because 'python'
is used instead of 'python3'.
Change was tested with:
- make docker-centos7
- make docker-centos8
- make docker-ubuntu-bionic
Differential Revision: https://phab.mercurial-scm.org/D9464
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Mon, 30 Nov 2020 10:18:36 +0100 |
parents | de1f4c431619 |
children |
line wrap: on
line diff
--- a/contrib/packaging/buildrpm Thu Nov 26 02:00:00 2020 -0500 +++ b/contrib/packaging/buildrpm Mon Nov 30 10:18:36 2020 +0100 @@ -56,7 +56,7 @@ exit 1 fi -gethgversion +gethgversion $PYTHONEXE if [ -z "$type" ] ; then release=1 @@ -76,7 +76,7 @@ fi mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS} -$HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz +$PYTHONEXE $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz if [ "$PYTHONVER" ]; then ( mkdir -p build @@ -112,7 +112,7 @@ if echo $version | grep '+' > /dev/null 2>&1; then latesttag="`echo $version | sed -e 's/+.*//'`" - $HG log -r .:"$latesttag" -fM \ + $PYTHONEXE $HG log -r .:"$latesttag" -fM \ --template '{date|hgdate}\t{author}\t{desc|firstline}\n' | python -c ' import sys, time @@ -136,9 +136,9 @@ else - $HG log \ + $PYTHONEXE $HG log \ --template '{date|hgdate}\t{author}\t{desc|firstline}\n' \ - .hgtags | python -c ' + .hgtags | $PYTHONEXE -c ' import sys, time def datestr(date, format):