disable python2
This commit is contained in:
parent
b3ae8b4456
commit
4fafd9b99c
48
pytest.spec
48
pytest.spec
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: pytest
|
Name: pytest
|
||||||
Version: 3.6.4
|
Version: 3.6.4
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: A mature full-featured Python testing tool
|
Summary: A mature full-featured Python testing tool
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://pytest.org
|
URL: http://pytest.org
|
||||||
@ -24,23 +24,6 @@ applications and libraries.
|
|||||||
%description
|
%description
|
||||||
%{_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}
|
%package -n python3-%{name}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python3-atomicwrites python3-attrs python3-devel python3-hypothesis
|
BuildRequires: python3-atomicwrites python3-attrs python3-devel python3-hypothesis
|
||||||
@ -65,7 +48,6 @@ Obsoletes: platform-python-%{name} < %{version}-%{release}
|
|||||||
%autosetup
|
%autosetup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%if 0%{?with_help}
|
%if 0%{?with_help}
|
||||||
@ -75,12 +57,6 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%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
|
%py3_install
|
||||||
for file in pytest py.test; do
|
for file in pytest py.test; do
|
||||||
mv $RPM_BUILD_ROOT%{_bindir}/${file} $RPM_BUILD_ROOT%{_bindir}/${file}-%{python3_version}
|
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
|
%check
|
||||||
%if %{with tests}
|
%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} \
|
PATH=$RPM_BUILD_ROOT%{_bindir}:${PATH} \
|
||||||
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
||||||
$RPM_BUILD_ROOT%{_bindir}/pytest-%{python3_version} -r s testing \
|
$RPM_BUILD_ROOT%{_bindir}/pytest-%{python3_version} -r s testing \
|
||||||
--timeout=30
|
--timeout=30
|
||||||
%endif
|
%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}
|
%files -n python3-%{name}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%{_bindir}/pytest
|
||||||
|
%{_bindir}/py.test
|
||||||
%{_bindir}/pytest-3
|
%{_bindir}/pytest-3
|
||||||
%{_bindir}/pytest-%{python3_version}
|
%{_bindir}/pytest-%{python3_version}
|
||||||
%{_bindir}/py.test-3
|
%{_bindir}/py.test-3
|
||||||
@ -141,6 +102,9 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 3.6.4-2
|
||||||
- Package init
|
- Package init
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user