!3 remove python2

From: @zhangtao2020
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-10-30 14:29:58 +08:00 committed by Gitee
commit 5359eae18a

View File

@ -1,27 +1,19 @@
%{!?_licensedir: %global license %%doc} %{!?_licensedir: %global license %%doc}
Name: python-contextlib2 Name: python-contextlib2
Version: 0.5.5 Version: 0.5.5
Release: 9 Release: 10
Summary: Backports and enhancements for the contextlib module Summary: Backports and enhancements for the contextlib module
License: Python License: Python
URL: https://pypi.io/project/contextlib2 URL: https://pypi.io/project/contextlib2
Source0: https://pypi.io/packages/source/c/contextlib2/contextlib2-%{version}.tar.gz Source0: https://pypi.io/packages/source/c/contextlib2/contextlib2-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-unittest2 python3-devel BuildRequires: python3-devel
%description %description
The package is a backport of the standard library's contextlib module to earlier Python versions. The package is a backport of the standard library's contextlib module to earlier Python versions.
It provides a ground for enhancements to the standard library version. It provides a ground for enhancements to the standard library version.
%package -n python2-contextlib2
Summary: Backports and enhancements for the contextlib module
%{?python_provide:%python_provide python2-contextlib2}
%description -n python2-contextlib2
The package is a backport of the standard library's contextlib module to earlier Python versions.
It provides a ground for enhancements to the standard library version.
%package -n python3-contextlib2 %package -n python3-contextlib2
Summary: Backports and enhancements for the contextlib module Summary: Backports and enhancements for the contextlib module
@ -37,7 +29,6 @@ rm -rf %{py3dir}
cp -a . %{py3dir} cp -a . %{py3dir}
%build %build
%{__python2} setup.py build
cd %{py3dir} cd %{py3dir}
%{__python3} setup.py build %{__python3} setup.py build
cd - cd -
@ -45,25 +36,19 @@ cd -
%install %install
cd %{py3dir} cd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
cd -
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%check %check
%{__python2} test_contextlib2.py
cd %{py3dir} cd %{py3dir}
%{__python3} test_contextlib2.py %{__python3} test_contextlib2.py
cd - cd -
%files -n python2-contextlib2
%doc README.rst VERSION.txt NEWS.rst
%license LICENSE.txt
%{python2_sitelib}/*
%files -n python3-contextlib2 %files -n python3-contextlib2
%doc README.rst VERSION.txt NEWS.rst %doc README.rst VERSION.txt NEWS.rst
%license LICENSE.txt %license LICENSE.txt
%{python3_sitelib}/* %{python3_sitelib}/*
%changelog %changelog
* Wed Oct 21 2020 zhangtao <zhangtao221@huawei.com> - 0.5.5-10
- delete python2
* Wed Mar 4 2020 zhujunhao <zhujunhao5@huawei.com> - 0.5.5-9 * Wed Mar 4 2020 zhujunhao <zhujunhao5@huawei.com> - 0.5.5-9
- Package init - Package init