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