# HG changeset patch
# User Mads Kiilerich <m...@kiilerich.com>
# Date 1572609562 -3600
#      Fri Nov 01 12:59:22 2019 +0100
# Branch stable
# Node ID dd589d02eba31ae40369d24bf3620863b4c86008
# Parent  27f849825e3a2fe7bd08a79659cfddaa95851ff9
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.

diff --git a/contrib/packaging/buildrpm b/contrib/packaging/buildrpm
--- a/contrib/packaging/buildrpm
+++ b/contrib/packaging/buildrpm
@@ -6,7 +6,7 @@
 
 BUILD=1
 RPMBUILDDIR="$PWD/rpmbuild"
-PYTHONEXE=python2
+PYTHONEXE=python3
 
 while [ "$1" ]; do
     case "$1" in
diff --git a/contrib/packaging/docker/fedora29 
b/contrib/packaging/docker/fedora29
--- a/contrib/packaging/docker/fedora29
+++ b/contrib/packaging/docker/fedora29
@@ -7,8 +7,8 @@ RUN dnf install -y \
        gcc \
        gettext \
        make \
-       python-devel \
-       python-docutils \
+       python3-devel \
+       python3-docutils \
        rpm-build
 
 # For creating repo meta data
diff --git a/contrib/packaging/mercurial.spec b/contrib/packaging/mercurial.spec
--- a/contrib/packaging/mercurial.spec
+++ b/contrib/packaging/mercurial.spec
@@ -2,7 +2,7 @@
 
 %define withpython %{nil}
 
-%global pythonexe python2
+%global pythonexe python3
 
 %if "%{?withpython}"
 
@@ -39,8 +39,8 @@ BuildRequires: make, gcc, gettext
 %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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to