%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name pika-pool %global old_name pika_pool %global _description Pika connection pooling inspired by:\ \ flask-pika\ sqlalchemy.pool.Pool Name: python-%{pypi_name} Version: 0.1.3 Release: 5%{?dist} Summary: Connection pooling for the Pika Python AMQP Client Library License: BSD URL: https://github.com/bninja/pika-pool Source0: https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source1: LICENSE BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %package -n python2-%{pypi_name} Summary: Connection pooling for the Pika Python AMQP Client Library %{?python_provide:%python_provide python2-%{pypi_name}} Provides: python-%{old_name} = %{version}-%{release} Provides: python2-%{old_name} = %{version}-%{release} Obsoletes: python-%{old_name} < 0.1.3-5 Obsoletes: python2-%{old_name} < 0.1.3-5 Requires: python-pika >= 0.9 %description -n python2-%{pypi_name} %{_description} %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: Connection pooling for the Pika Python AMQP Client Library %{?python_provide:%python_provide python3-%{pypi_name}} Provides: python3-%{old_name} = %{version}-%{release} Obsoletes: python3-%{old_name} < 0.1.3-5 BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-pika >= 0.9 %description -n python3-%{pypi_name} %{_description} %endif %description %{_description} %prep %autosetup -n %{pypi_name}-%{version} # No license file in source, https://github.com/bninja/pika-pool/issues/7 cp %{SOURCE1} . %build %py2_build %if 0%{?with_python3} %py3_build %endif %install # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %if 0%{?with_python3} %py3_install %endif %py2_install %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitelib}/pika_pool.py* %{python2_sitelib}/pika_pool-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %dir %{python3_sitelib}/__pycache__/ %{python3_sitelib}/__pycache__/* %{python3_sitelib}/pika_pool.py %{python3_sitelib}/pika_pool-%{version}-py?.?.egg-info %endif %changelog * Thu Aug 18 2016 Javier Peña - 0.1.3-5 - Renamed package to python-pika-pool * Tue Jul 19 2016 Fedora Release Engineering - 0.1.3-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Wed Feb 24 2016 Javier Peña - 0.1.3-3 - Switch name to python-pika_pool * Wed Feb 24 2016 Javier Peña - 0.1.3-2 - Updated to enable py3 subpackage * Wed Jan 20 2016 jpena - 0.1.3-1 - Initial package.