%{!?upstream_version: %global upstream_version %{version}%{?milestone}} %if 0%{?fedora} %global with_python3 1 %endif %global pypi_name retryz %global summary Retry decorator with a bunch of configuration parameters Name: python-%{pypi_name} Version: 0.1.8 Release: 1 Summary: %{summary} License: ASL 2.0 URL: https://pypi.python.org/pypi/retryz Source0: https://pypi.python.org/packages/a8/5b/35f5e9c23b533a676b831c695671b54d2d0781d121989ee07bf80c290f78/retryz-0.1.8.zip BuildArch: noarch %description Retry decorator with a bunch of configuration parameters %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2 BuildRequires: python2-devel # for running tests BuildRequires: python2-pytest BuildRequires: python2-hamcrest %description -n python2-%{pypi_name} Retry decorator with a bunch of configuration parameters %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3 BuildRequires: python3-devel # for running tests BuildRequires: python3-pytest BuildRequires: python3-hamcrest %description -n python3-%{pypi_name} Retry decorator with a bunch of configuration parameters %endif %prep %setup -q -n %{pypi_name}-%{upstream_version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %check PYTHONPATH=. py.test-2.7 %if 0%{?with_python3} PYTHONPATH=. py.test-3 %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.rst %{python2_sitelib}/retryz* %if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.rst %{python3_sitelib}/retryz* %endif %changelog * Wed Feb 01 2017 Eric Harney - 0.1.8-1 - Initial package