Show More
@@ -15,7 +15,8 b'' | |||
|
15 | 15 | |
|
16 | 16 | %else |
|
17 | 17 | |
|
18 | %global pythonver %(python -c 'import sys;print(".".join(map(str, sys.version_info[:2])))') | |
|
18 | %global pythonexe python2 | |
|
19 | %global pythonver %(%{pythonexe} -c 'import sys;print(".".join(map(str, sys.version_info[:2])))') | |
|
19 | 20 | |
|
20 | 21 | %endif |
|
21 | 22 | |
@@ -52,7 +53,7 b' for efficient handling of very large dis' | |||
|
52 | 53 | %if "%{?withpython}" |
|
53 | 54 | %setup -q -n mercurial-%{version}-%{release} -a1 -a2 |
|
54 | 55 | # despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up |
|
55 | sed -i '1c#! /usr/bin/env python' %{pythonname}/Lib/cgi.py | |
|
56 | sed -i '1c#! /usr/bin/env %{pythonexe}' %{pythonname}/Lib/cgi.py | |
|
56 | 57 | %else |
|
57 | 58 | %setup -q -n mercurial-%{version}-%{release} |
|
58 | 59 | %endif |
@@ -82,9 +83,11 b' export PYTHONPATH=$PWD/%{docutilsname}' | |||
|
82 | 83 | |
|
83 | 84 | %endif |
|
84 | 85 | |
|
85 | make all | |
|
86 | make all PYTHON=%{pythonexe} | |
|
86 | 87 | make -C contrib/chg |
|
87 | 88 | |
|
89 | sed -i -e '1s|#!/usr/bin/env python$|#!/usr/bin/env %{pythonexe}|' contrib/hg-ssh | |
|
90 | ||
|
88 | 91 | %install |
|
89 | 92 | rm -rf $RPM_BUILD_ROOT |
|
90 | 93 | |
@@ -101,14 +104,14 b' cd %{docutilsname}' | |||
|
101 | 104 | LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT" |
|
102 | 105 | cd - |
|
103 | 106 | |
|
104 | PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir} | |
|
107 | PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir} | |
|
105 | 108 | mkdir -p $RPM_BUILD_ROOT%{_bindir} |
|
106 | 109 | ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . ) |
|
107 | 110 | ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} ) |
|
108 | 111 | |
|
109 | 112 | %else |
|
110 | 113 | |
|
111 | make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir} | |
|
114 | make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir} | |
|
112 | 115 | |
|
113 | 116 | %endif |
|
114 | 117 |
General Comments 0
You need to be logged in to leave comments.
Login now