%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name persist-queue Name: python-%{pypi_name} Version: 0.1.4 Release: 1%{?dist} Summary: A single process, persistent multi-producer, multi-consumer queue License: ASL 2.0 URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://pypi.io/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source1: LICENSE # Submitted for inclusion in the source tarball: # https://github.com/peter-wangxu/persist-queue/pull/6 BuildArch: noarch %description A single process, persistent multi-producer, multi-consumer queue %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python-mock BuildRequires: python-setuptools BuildRequires: python-pytest %description -n python2-%{pypi_name} A single process, persistent multi-producer, multi-consumer queue %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-mock BuildRequires: python3-pytest %description -n python3-%{pypi_name} A single process, persistent multi-producer, multi-consumer queue %endif %prep %setup -n %{pypi_name}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif install -p -m 644 %{SOURCE1} LICENSE %check py.test-2 tests/test_queue.py %if 0%{?with_python3} py.test-3 tests/test_queue.py %endif %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/* %exclude %{python2_sitelib}/tests %if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/* %exclude %{python3_sitelib}/tests %endif %changelog * Tue Feb 14 2017 Eric Harney - 0.1.4-1 - Initial package