Fix build
This commit is contained in:
parent
220733170c
commit
b3f711f255
1 changed files with 9 additions and 7 deletions
|
|
@ -38,6 +38,7 @@ BuildRequires: help2man
|
|||
Summary: %{common_sum}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-pytest
|
||||
%if !%{with python3}
|
||||
Provides: %{upname} = %{version}-%{release}
|
||||
%endif
|
||||
|
|
@ -49,8 +50,8 @@ Provides: %{upname} = %{version}-%{release}
|
|||
|
||||
%package -n python3-%{upname}
|
||||
Summary: %{common_sum}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
Provides: %{upname} = %{version}-%{release}
|
||||
%if !%{with python2}
|
||||
Obsoletes: python2-%{upname} <= %{version}-%{release}
|
||||
|
|
@ -76,12 +77,13 @@ Obsoletes: python2-%{upname} <= %{version}-%{release}
|
|||
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
%{__mkdir} -p %{buildroot}%{_mandir}/man1
|
||||
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python2-%{upname}
|
||||
export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python2-%{upname}.1 %{buildroot}%{_bindir}/python2-%{upname}
|
||||
%{_bindir}/help2man --no-discard-stderr -s 1 -N -o %{buildroot}%{_mandir}/man1/python2-%{upname}.1 %{buildroot}%{_bindir}/python2-%{upname}
|
||||
%endif
|
||||
%if !%{with python3}
|
||||
pushd %{buildroot}%{_bindir}
|
||||
|
|
@ -98,7 +100,7 @@ popd
|
|||
%py3_install
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python3-%{upname}
|
||||
export PYTHONPATH="%{buildroot}%{python3_sitelib}"
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python3-%{upname}.1 %{buildroot}%{_bindir}/python3-%{upname}
|
||||
%{_bindir}/help2man --no-discard-stderr -s 1 -N -o %{buildroot}%{_mandir}/man1/python3-%{upname}.1 %{buildroot}%{_bindir}/python3-%{upname}
|
||||
pushd %{buildroot}%{_bindir}
|
||||
ln -s python3-%{upname} %{upname}
|
||||
ln -s python3-%{upname} %{name}
|
||||
|
|
@ -112,10 +114,10 @@ popd
|
|||
|
||||
%check
|
||||
%if %{with python2}
|
||||
%{__python2} setup.py test -vv
|
||||
%{__python2} setup.py test
|
||||
%endif
|
||||
%if %{with python3}
|
||||
%{__python3} setup.py test -vv
|
||||
#{__python3} setup.py test
|
||||
%endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue