From 0cc6a6fe7459dae171389293feecf0963026bdb4 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mar 29 2016 00:59:46 +0000 Subject: Add a python3 subpackage. --- diff --git a/python-socketpool.spec b/python-socketpool.spec index c2a5a4a..2fdab6f 100644 --- a/python-socketpool.spec +++ b/python-socketpool.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 0.5.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A simple Python socket pool License: Public Domain or MIT @@ -10,32 +10,81 @@ URL: https://github.com/benoitc/%{pypi_name} Source0: http://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif %description Socket pool is a simple socket pool that supports multiple factories and backends. It can easily be used by gevent, eventlet or any other library. + +%package -n python2-socketpool +Summary: A simple Python socket pool +%{?python_provide:%python_provide python2-socketpool} + +Requires: python2 + +%description -n python2-socketpool +Socket pool is a simple socket pool that supports multiple factories and +backends. It can easily be used by gevent, eventlet or any other library. + +%if 0%{?with_python3} +%package -n python3-socketpool +Summary: A simple Python socket pool +%{?python_provide:%python_provide python3-socketpool} + +Requires: python3 + +%description -n python3-socketpool +Socket pool is a simple socket pool that supports multiple factories and +backends. It can easily be used by gevent, eventlet or any other library. +%endif + %prep %setup -q -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build -%{__python} setup.py build - +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-data %{_docdir} -mv examples %{buildroot}%{_docdir}/%{pypi_name}/ - - -%files -%doc %{_docdir}/%{pypi_name} -%{python_sitelib}/%{pypi_name}* - +%py2_install +%if 0%{?with_python3} +%py3_install +%endif + +# Erroneously installed stuff. Remove it! +rm %{buildroot}/usr/socketpool/LICENSE +rm %{buildroot}/usr/socketpool/MANIFEST.in +rm %{buildroot}/usr/socketpool/NOTICE +rm %{buildroot}/usr/socketpool/README.rst +rm %{buildroot}/usr/socketpool/THANKS +rm %{buildroot}/usr/socketpool/UNLICENSE + +%files -n python2-socketpool +%doc README.rst THANKS UNLICENSE NOTICE examples/ +%license LICENSE +%{python2_sitelib}/%{pypi_name}* + +%if 0%{?with_python3} +%files -n python3-socketpool +%doc README.rst THANKS UNLICENSE NOTICE examples/ +%license LICENSE +%{python3_sitelib}/%{pypi_name}* +%endif %changelog +* Mon Mar 28 2016 Ralph Bean - 0.5.3-5 +- Added a python3 subpackage. + * Thu Feb 04 2016 Fedora Release Engineering - 0.5.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild