changeset 43358:518655314fc5 stable

packaging: use "python3" for fedora29 ... and as buildrpm default Change the buidrpm default. The CentOS targets explicitly use "python", and changing the default will only influence Fedora 29. A Python 3 package needs python3 dependencies, so pythonexe (and pythonver) is used for specifying dependencies. Other OS versions will keep using "python" as before ... or potentially change to explicit "python2". Fedora 29 packages can thus also still be built for Python 2 - just not in the docker image that is updated for Python 3.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 01 Nov 2019 12:59:22 +0100
parents 90dc0d3111d0
children e66a3bfcb19b
files contrib/packaging/buildrpm contrib/packaging/docker/fedora29 contrib/packaging/mercurial.spec
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/packaging/buildrpm	Fri Nov 01 12:47:38 2019 +0100
+++ b/contrib/packaging/buildrpm	Fri Nov 01 12:59:22 2019 +0100
@@ -6,7 +6,7 @@
 
 BUILD=1
 RPMBUILDDIR="$PWD/rpmbuild"
-PYTHONEXE=python2
+PYTHONEXE=python3
 
 while [ "$1" ]; do
     case "$1" in
--- a/contrib/packaging/docker/fedora29	Fri Nov 01 12:47:38 2019 +0100
+++ b/contrib/packaging/docker/fedora29	Fri Nov 01 12:59:22 2019 +0100
@@ -7,8 +7,8 @@
 	gcc \
 	gettext \
 	make \
-	python-devel \
-	python-docutils \
+	python3-devel \
+	python3-docutils \
 	rpm-build
 
 # For creating repo meta data
--- a/contrib/packaging/mercurial.spec	Fri Nov 01 12:47:38 2019 +0100
+++ b/contrib/packaging/mercurial.spec	Fri Nov 01 12:59:22 2019 +0100
@@ -2,7 +2,7 @@
 
 %define withpython %{nil}
 
-%global pythonexe python2
+%global pythonexe python3
 
 %if "%{?withpython}"
 
@@ -39,8 +39,8 @@
 %if "%{?withpython}"
 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
 %else
-BuildRequires: python >= %{pythonver}, python-devel, python-docutils >= 0.5
-Requires: python >= %{pythonver}
+BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythonexe}-docutils >= 0.5
+Requires: %{pythonexe} >= %{pythonver}
 %endif
 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
 #Requires: tk