# Created by pyp2rpm-3.2.2
%global pypi_name ratelimitingfilter
# Disable python2 subpackage from F29+
%if 0%{?fedora} > 28 || 0%{?rhel} > 7
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-%{pypi_name}
Version: 1.1
Release: 8%{?dist}
Summary: A rate limiting filter for the Python logging system
License: MIT
URL: https://github.com/wkeeling/ratelimitingfilter
Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-mock
BuildRequires: python2-setuptools
%endif
BuildRequires: python3-devel
BuildRequires: python3-mock
BuildRequires: python3-setuptools
%description
The RateLimitingFilter is a filter for the Python logging system that allows
you to restrict the rate at which messages can pass through your logging
handlers. The filter can be useful if you're using a handler such as Python's
logging.handlers.SMTPHandler to send error notification emails.
Error notification emails provide a useful means of keeping an eye on.
%if %{with python2}
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
The RateLimitingFilter is a filter for the Python logging system that allows
you to restrict the rate at which messages can pass through your logging
handlers. The filter can be useful if you're using a handler such as Python's
logging.handlers.SMTPHandler to send error notification emails.
Error notification emails provide a useful means of keeping an eye on.
%endif
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
The RateLimitingFilter is a filter for the Python logging system that allows
you to restrict the rate at which messages can pass through your logging
handlers. The filter can be useful if you're using a handler such as Python's
logging.handlers.SMTPHandler to send error notification emails.
Error notification emails provide a useful means of keeping an eye on.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%if %{with python2}
%py2_build
%endif
%py3_build
%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%py3_install
%if %{with python2}
%py2_install
%endif
%if %{with python2}
%files -n python2-%{pypi_name}
%doc README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1-7
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1-4
- Rebuilt for Python 3.8
* Thu Aug 01 2019 Martin Kutlak <mkutlak@redhat.com> - 1.1-3
- Drop python2 from epel8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Mar 06 2019 Martin Kutlak <mkutlak@redhat.com> - 1.1-1
- Update to upstream version 1.1.
- Remove check section as it is not provided in sources.
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6-3
- Rebuilt for Python 3.7
* Wed Mar 14 2018 Martin Kutlak <mkutlak@redhat.com> - 0.6-1
- Drop python2 subpackage from Fedora 29+
* Wed Mar 14 2018 Martin Kutlak <mkutlak@redhat.com> - 0.6-1
- Initial package.