%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name pika-pool %global pkg_name pika_pool Name: python-%{pkg_name} Version: 0.1.3 Release: 3%{?dist} Summary: Pools for pikas License: BSD URL: https://github.com/bninja/pika-pool Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source1: LICENSE BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %package -n python2-%{pkg_name} Summary: Pools for pikas %{?python_provide:%python_provide python2-%{pkg_name}} Requires: python-pika >= 0.9 %description -n python2-%{pkg_name} Pika connection pooling inspired by: flask-pika sqlalchemy.pool.Pool %if 0%{?with_python3} %package -n python3-%{pkg_name} Summary: Pools for pikas %{?python_provide:%python_provide python3-%{pkg_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-pika >= 0.9 %description -n python3-%{pkg_name} Pika connection pooling inspired by: flask-pika sqlalchemy.pool.Pool %endif %description Pika connection pooling inspired by: flask-pika sqlalchemy.pool.Pool %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-%{pkg_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-%{pkg_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 * 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.