Blob Blame History Raw
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%if 0%{?fedora}
%global with_python3 1
%endif

%global pypi_name retryz


Name:           python-%{pypi_name}
Version:        0.1.9
Release:        5%{?dist}
Summary:        Retry decorator with a bunch of configuration parameters

License:        ASL 2.0
URL:            https://pypi.python.org/pypi/retryz
Source0:        https://pypi.io/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
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
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.1.9-4
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon May 22 2017 Eric Harney <eharney@redhat.com> - 0.1.9-1
- Update to 0.1.9

* Wed Feb 01 2017 Eric Harney <eharney@redhat.com> - 0.1.8-1
- Initial package