packaging: use "python3" for fedora29 ... and as buildrpm default stable
authorMads Kiilerich <mads@kiilerich.com>
Fri, 01 Nov 2019 12:59:22 +0100
branchstable
changeset 43358 518655314fc5
parent 43357 90dc0d3111d0
child 43359 e66a3bfcb19b
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.
contrib/packaging/buildrpm
contrib/packaging/docker/fedora29
contrib/packaging/mercurial.spec
--- 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