Show More
@@ -11,6 +11,7 b'' | |||
|
11 | 11 | |
|
12 | 12 | BUILD=1 |
|
13 | 13 | RPMBUILDDIR="$PWD/rpmbuild" |
|
14 | PYTHONEXE=python2 | |
|
14 | 15 | |
|
15 | 16 | while [ "$1" ]; do |
|
16 | 17 | case "$1" in |
@@ -18,6 +19,10 b' while [ "$1" ]; do' | |||
|
18 | 19 | shift |
|
19 | 20 | BUILD= |
|
20 | 21 | ;; |
|
22 | --python3) | |
|
23 | shift | |
|
24 | PYTHONEXE=python3 | |
|
25 | ;; | |
|
21 | 26 | --withpython | --with-python) |
|
22 | 27 | shift |
|
23 | 28 | PYTHONVER=2.7.16 |
@@ -96,6 +101,7 b' rpmspec=$RPMBUILDDIR/SPECS/mercurial.spe' | |||
|
96 | 101 | |
|
97 | 102 | sed -e "s,^Version:.*,Version: $version," \ |
|
98 | 103 | -e "s,^Release:.*,Release: $release," \ |
|
104 | -e "s/^%global pythonexe .*/%global pythonexe $PYTHONEXE/" \ | |
|
99 | 105 | $specfile > $rpmspec |
|
100 | 106 | |
|
101 | 107 | echo >> $rpmspec |
@@ -38,8 +38,8 b' BuildRequires: make, gcc, gettext' | |||
|
38 | 38 | %if "%{?withpython}" |
|
39 | 39 | BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel |
|
40 | 40 | %else |
|
41 |
BuildRequires: python >= |
|
|
42 |
Requires: python >= |
|
|
41 | BuildRequires: python >= %{pythonver}, python-devel, python-docutils >= 0.5 | |
|
42 | Requires: python >= %{pythonver} | |
|
43 | 43 | %endif |
|
44 | 44 | # The hgk extension uses the wish tcl interpreter, but we don't enforce it |
|
45 | 45 | #Requires: tk |
@@ -60,6 +60,8 b" sed -i '1c#! /usr/bin/env %{pythonexe}' " | |||
|
60 | 60 | |
|
61 | 61 | %build |
|
62 | 62 | |
|
63 | export HGPYTHON3=1 | |
|
64 | ||
|
63 | 65 | %if "%{?withpython}" |
|
64 | 66 | |
|
65 | 67 | PYPATH=$PWD/%{pythonname} |
@@ -91,6 +93,8 b" sed -i -e '1s|#!/usr/bin/env python$|#!/" | |||
|
91 | 93 | %install |
|
92 | 94 | rm -rf $RPM_BUILD_ROOT |
|
93 | 95 | |
|
96 | export HGPYTHON3=1 | |
|
97 | ||
|
94 | 98 | %if "%{?withpython}" |
|
95 | 99 | |
|
96 | 100 | PYPATH=$PWD/%{pythonname} |
General Comments 0
You need to be logged in to leave comments.
Login now