remove python2 subpackage

This commit is contained in:
lei_ju 2020-10-29 10:33:41 +08:00
parent 9f4ad97105
commit 5cb5146939

View File

@ -1,9 +1,9 @@
%global __provides_exclude_from ^%{python2_sitearch}/.*\\.so$ ^%{python3_sitearch}/.*\\.so$ %global __provides_exclude_from ^%{python3_sitearch}/.*\\.so$
%global optflags %(echo %{optflags} -I%{_includedir}/libev) %global optflags %(echo %{optflags} -I%{_includedir}/libev)
Name: python-gevent Name: python-gevent
Version: 1.3.6 Version: 1.3.6
Release: 2 Release: 3
Summary: A coroutine-based Python networking library Summary: A coroutine-based Python networking library
License: MIT License: MIT
URL: http://www.gevent.org/ URL: http://www.gevent.org/
@ -28,29 +28,6 @@ Features include:
%package_help %package_help
%package -n python2-gevent
Summary: %{summary}
%{?python_provide:%python_provide python2-gevent}
BuildRequires: python2-devel python2-greenlet-devel
Requires: python2-greenlet
%description -n python2-gevent
gevent is a coroutine -based Python networking library that uses greenlet to
provide a high-level synchronous API on top of the libev or libuv event loop.
Features include:
* Fast event loop based on libev or libuv.
* Lightweight execution units based on greenlets.
* API that re-uses concepts from the Python standard library (for examples there are events and queues).
* Cooperative sockets with SSL support
* Cooperative DNS queries performed through a threadpool, dnspython, or c-ares.
* Monkey patching utility to get 3rd party modules to become cooperative
* TCP/UDP/HTTP servers
* Subprocess support (through gevent.subprocess)
* Thread pools
Python 2 version.
%package -n python3-gevent %package -n python3-gevent
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-gevent} %{?python_provide:%python_provide python3-gevent}
@ -85,16 +62,13 @@ sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py
export LIBEV_EMBED=0 export LIBEV_EMBED=0
export CARES_EMBED=0 export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1 export GEVENT_NO_CFFI_BUILD=1
%py2_build
%py3_build %py3_build
%install %install
export LIBEV_EMBED=0 export LIBEV_EMBED=0
export CARES_EMBED=0 export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1 export GEVENT_NO_CFFI_BUILD=1
%py2_install
%py3_install %py3_install
rm %{buildroot}%{python2_sitearch}/gevent/_*3.py*
rm %{buildroot}%{python3_sitearch}/gevent/_*2.py rm %{buildroot}%{python3_sitearch}/gevent/_*2.py
rm %{buildroot}%{python3_sitearch}/gevent/__pycache__/_*2.* rm %{buildroot}%{python3_sitearch}/gevent/__pycache__/_*2.*
find %{buildroot} -name '.buildinfo' -delete find %{buildroot} -name '.buildinfo' -delete
@ -104,17 +78,15 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
%files help %files help
%doc README.rst %doc README.rst
%files -n python2-gevent
%defattr(-,root,root)
%license LICENSE
%{python2_sitearch}/gevent*
%files -n python3-gevent %files -n python3-gevent
%defattr(-,root,root) %defattr(-,root,root)
%license LICENSE %license LICENSE
%{python3_sitearch}/gevent* %{python3_sitearch}/gevent*
%changelog %changelog
* Wed Oct 21 2020 leiju <leiju4@huawei.com> - 1.3.6-3
- remove python2 subpackage
* Tue Dec 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.6-2 * Tue Dec 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.6-2
- modify spec format - modify spec format