!6 disable python2
From: @jackie_wu123 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
add1d435c9
48
pytest.spec
48
pytest.spec
@ -6,7 +6,7 @@
|
||||
|
||||
Name: pytest
|
||||
Version: 3.6.4
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: A mature full-featured Python testing tool
|
||||
License: MIT
|
||||
URL: http://pytest.org
|
||||
@ -24,23 +24,6 @@ applications and libraries.
|
||||
%description
|
||||
%{_description}
|
||||
|
||||
%package -n python2-%{name}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python2-atomicwrites python2-attrs python2-devel python2-funcsigs
|
||||
BuildRequires: python2-hypothesis python2-more-itertools >= 4.0.0 python2-pluggy
|
||||
BuildRequires: python2-py >= %{pylib_version} python2-setuptools
|
||||
BuildRequires: python2-setuptools_scm python2-six
|
||||
Requires: python2-atomicwrites python2-attrs python2-funcsigs
|
||||
Requires: python2-more-itertools >= 4.0.0 python2-pluggy python2-six
|
||||
Requires: python2-py >= %{pylib_version} python2-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python2-%{name}}
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Obsoletes: %{name} < 2.8.7-3
|
||||
|
||||
%description -n python2-%{name}
|
||||
%{_description}
|
||||
|
||||
%package -n python3-%{name}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python3-atomicwrites python3-attrs python3-devel python3-hypothesis
|
||||
@ -65,7 +48,6 @@ Obsoletes: platform-python-%{name} < %{version}-%{release}
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%if 0%{?with_help}
|
||||
@ -75,12 +57,6 @@ done
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
for file in pytest py.test; do
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/${file} $RPM_BUILD_ROOT%{_bindir}/${file}-%{python2_version}
|
||||
ln -snf ${file}-%{python2_version} $RPM_BUILD_ROOT%{_bindir}/${file}-2
|
||||
done
|
||||
|
||||
%py3_install
|
||||
for file in pytest py.test; do
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/${file} $RPM_BUILD_ROOT%{_bindir}/${file}-%{python3_version}
|
||||
@ -101,31 +77,16 @@ find $RPM_BUILD_ROOT{%{python2_sitelib},%{python3_sitelib}} \
|
||||
|
||||
%check
|
||||
%if %{with tests}
|
||||
PATH=$RPM_BUILD_ROOT%{_bindir}:${PATH} \
|
||||
PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitelib} \
|
||||
$RPM_BUILD_ROOT%{_bindir}/pytest-%{python2_version} -r s testing \
|
||||
--timeout=30
|
||||
|
||||
PATH=$RPM_BUILD_ROOT%{_bindir}:${PATH} \
|
||||
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
||||
$RPM_BUILD_ROOT%{_bindir}/pytest-%{python3_version} -r s testing \
|
||||
--timeout=30
|
||||
%endif
|
||||
|
||||
%files -n python2-%{name}
|
||||
%license LICENSE
|
||||
%{_bindir}/pytest
|
||||
%{_bindir}/pytest-2
|
||||
%{_bindir}/pytest-%{python2_version}
|
||||
%{_bindir}/py.test
|
||||
%{_bindir}/py.test-2
|
||||
%{_bindir}/py.test-%{python2_version}
|
||||
%{python2_sitelib}/pytest-*.egg-info/
|
||||
%{python2_sitelib}/_pytest/
|
||||
%{python2_sitelib}/pytest.py*
|
||||
|
||||
%files -n python3-%{name}
|
||||
%license LICENSE
|
||||
%{_bindir}/pytest
|
||||
%{_bindir}/py.test
|
||||
%{_bindir}/pytest-3
|
||||
%{_bindir}/pytest-%{python3_version}
|
||||
%{_bindir}/py.test-3
|
||||
@ -141,6 +102,9 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 2 2020 wutao <wutao61@huawei.com> - 3.6.4-4
|
||||
- disable python2
|
||||
|
||||
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 3.6.4-2
|
||||
- Package init
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user