# Created by pyp2rpm-3.2.2 %global pypi_name ratelimitingfilter # Disable python2 subpackage from F29+ %if 0%{?fedora} > 28 %bcond_with python2 %else %bcond_without python2 %endif Name: python-%{pypi_name} Version: 0.6 Release: 4%{?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 %check %if %{with python2} %{__python2} setup.py test %endif %{__python3} setup.py test %if %{with python2} %files -n python2-%{pypi_name} %doc README.md README.rst %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %files -n python3-%{pypi_name} %doc README.md README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Sat Jul 14 2018 Fedora Release Engineering - 0.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro HronĨok - 0.6-3 - Rebuilt for Python 3.7 * Wed Mar 14 2018 Martin Kutlak - 0.6-1 - Drop python2 subpackage from Fedora 29+ * Wed Mar 14 2018 Martin Kutlak - 0.6-1 - Initial package.