6c38b2e
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
6c38b2e
%if 0%{?fedora}
6c38b2e
%global with_python3 1
6c38b2e
%endif
6c38b2e
6c38b2e
%global pypi_name retryz
6c38b2e
6c38b2e
6c38b2e
Name:           python-%{pypi_name}
105a720
Version:        0.1.9
4381674
Release:        3%{?dist}
6c38b2e
Summary:        Retry decorator with a bunch of configuration parameters
6c38b2e
6c38b2e
License:        ASL 2.0
6c38b2e
URL:            https://pypi.python.org/pypi/retryz
105a720
Source0:        https://pypi.io/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
6c38b2e
BuildArch:      noarch
6c38b2e
6c38b2e
%description
6c38b2e
Retry decorator with a bunch of configuration parameters.
6c38b2e
6c38b2e
%package -n python2-%{pypi_name}
6c38b2e
Summary:        %{summary}
6c38b2e
6c38b2e
%{?python_provide:%python_provide python2-%{pypi_name}}
6c38b2e
6c38b2e
Requires:       python2
6c38b2e
6c38b2e
BuildRequires:  python2-devel
6c38b2e
6c38b2e
# for running tests
6c38b2e
BuildRequires:  python2-pytest
6c38b2e
BuildRequires:  python2-hamcrest
6c38b2e
6c38b2e
6c38b2e
%description -n python2-%{pypi_name}
6c38b2e
Retry decorator with a bunch of configuration parameters.
6c38b2e
6c38b2e
%if 0%{?with_python3}
6c38b2e
%package -n python3-%{pypi_name}
6c38b2e
Summary:        %{summary}
6c38b2e
6c38b2e
%{?python_provide:%python_provide python3-%{pypi_name}}
6c38b2e
6c38b2e
Requires:       python3
6c38b2e
6c38b2e
BuildRequires:  python3-devel
6c38b2e
6c38b2e
# for running tests
6c38b2e
BuildRequires:  python3-pytest
6c38b2e
BuildRequires:  python3-hamcrest
6c38b2e
6c38b2e
%description -n python3-%{pypi_name}
6c38b2e
Retry decorator with a bunch of configuration parameters.
6c38b2e
6c38b2e
%endif
6c38b2e
6c38b2e
%prep
6c38b2e
%setup -q -n %{pypi_name}-%{upstream_version}
6c38b2e
6c38b2e
%build
6c38b2e
%py2_build
6c38b2e
%if 0%{?with_python3}
6c38b2e
%py3_build
6c38b2e
%endif
6c38b2e
6c38b2e
%check
6c38b2e
PYTHONPATH=. py.test-2.7
6c38b2e
%if 0%{?with_python3}
6c38b2e
PYTHONPATH=. py.test-3
6c38b2e
%endif
6c38b2e
6c38b2e
6c38b2e
%install
6c38b2e
%py2_install
6c38b2e
6c38b2e
%if 0%{?with_python3}
6c38b2e
%py3_install
6c38b2e
%endif
6c38b2e
6c38b2e
%files -n python2-%{pypi_name}
6c38b2e
%license LICENSE.txt
6c38b2e
%doc README.rst
6c38b2e
%{python2_sitelib}/retryz*
6c38b2e
6c38b2e
%if 0%{?with_python3}
6c38b2e
%files -n python3-%{pypi_name}
6c38b2e
%license LICENSE.txt
6c38b2e
%doc README.rst
6c38b2e
%{python3_sitelib}/retryz*
6c38b2e
%endif
6c38b2e
6c38b2e
%changelog
4381674
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-3
4381674
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4381674
e6aa6fb
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-2
e6aa6fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e6aa6fb
105a720
* Mon May 22 2017 Eric Harney <eharney@redhat.com> - 0.1.9-1
105a720
- Update to 0.1.9
105a720
6c38b2e
* Wed Feb 01 2017 Eric Harney <eharney@redhat.com> - 0.1.8-1
6c38b2e
- Initial package