!1 package init

Merge pull request !1 from compile_success/master
This commit is contained in:
openeuler-ci-bot 2020-03-06 22:12:46 +08:00 committed by Gitee
commit 48bba39c9e
2 changed files with 69 additions and 0 deletions

BIN
contextlib2-0.5.5.tar.gz Normal file

Binary file not shown.

69
python-contextlib2.spec Normal file
View File

@ -0,0 +1,69 @@
%{!?_licensedir: %global license %%doc}
Name: python-contextlib2
Version: 0.5.5
Release: 9
Summary: Backports and enhancements for the contextlib module
License: Python
URL: https://pypi.io/project/contextlib2
Source0: https://pypi.io/packages/source/c/contextlib2/contextlib2-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python2-unittest2 python3-devel
%description
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 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
Summary: Backports and enhancements for the contextlib module
%description -n python3-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.
%prep
%autosetup -n contextlib2-%{version}
rm -rf contextlib2.egg-info
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
%{__python2} setup.py build
cd %{py3dir}
%{__python3} setup.py build
cd -
%install
cd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
cd -
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%check
%{__python2} test_contextlib2.py
cd %{py3dir}
%{__python3} test_contextlib2.py
cd -
%files -n python2-contextlib2
%doc README.rst VERSION.txt NEWS.rst
%license LICENSE.txt
%{python2_sitelib}/*
%files -n python3-contextlib2
%doc README.rst VERSION.txt NEWS.rst
%license LICENSE.txt
%{python3_sitelib}/*
%changelog
* Wed Mar 4 2020 zhujunhao <zhujunhao5@huawei.com> - 0.5.5-9
- Package init