comparison contrib/packaging/mercurial.spec @ 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 5989f697890a
children de1f4c431619
comparison
equal deleted inserted replaced
43357:90dc0d3111d0 43358:518655314fc5
1 %global emacs_lispdir %{_datadir}/emacs/site-lisp 1 %global emacs_lispdir %{_datadir}/emacs/site-lisp
2 2
3 %define withpython %{nil} 3 %define withpython %{nil}
4 4
5 %global pythonexe python2 5 %global pythonexe python3
6 6
7 %if "%{?withpython}" 7 %if "%{?withpython}"
8 8
9 %global pythonver %{withpython} 9 %global pythonver %{withpython}
10 %global pythonname Python-%{withpython} 10 %global pythonname Python-%{withpython}
37 37
38 BuildRequires: make, gcc, gettext 38 BuildRequires: make, gcc, gettext
39 %if "%{?withpython}" 39 %if "%{?withpython}"
40 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel 40 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
41 %else 41 %else
42 BuildRequires: python >= %{pythonver}, python-devel, python-docutils >= 0.5 42 BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythonexe}-docutils >= 0.5
43 Requires: python >= %{pythonver} 43 Requires: %{pythonexe} >= %{pythonver}
44 %endif 44 %endif
45 # The hgk extension uses the wish tcl interpreter, but we don't enforce it 45 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
46 #Requires: tk 46 #Requires: tk
47 47
48 %description 48 %description