%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_with python2 %bcond_without python3 %else %bcond_without python2 %bcond_with python3 %endif %global modname logutils Name: python-%{modname} Version: 0.3.5 Release: 6.1%{?dist} Summary: Logging utilities Group: Development/Libraries License: BSD URL: https://pypi.io/project/logutils Source0: https://pypi.io/packages/source/l/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch %if %{with python2} BuildRequires: python2-devel %endif %if %{with python3} BuildRequires: python3-devel %endif %global _description\ The logutils package provides a set of handlers for the Python standard\ library's logging package.\ \ Some of these handlers are out-of-scope for the standard library, and so\ they are packaged here. Others are updated versions which have appeared in\ recent Python releases, but are usable with older versions of Python and so\ are packaged here. %description %_description %if %{with python2} %package -n python2-logutils Summary: %summary %{?python_provide:%python_provide python2-logutils} %description -n python2-logutils %_description %endif %if %{with python3} %package -n python3-logutils Summary: Logging utilities Group: Development/Libraries %description -n python3-logutils The logutils package provides a set of handlers for the Python standard library's logging package. Some of these handlers are out-of-scope for the standard library, and so they are packaged here. Others are updated versions which have appeared in recent Python releases, but are usable with older versions of Python and so are packaged here. %endif %prep %autosetup -n %{modname}-%{version} # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info %if %{with python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %if %{with python2} %{__python2} setup.py build %endif %if %{with python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if 0%{with python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif %if %{with python2} %{__python2} setup.py install -O1 --skip-build --root=%{buildroot} %endif %check %if %{with python2} %{__python2} setup.py test %endif %if %{with python3} pushd %{py3dir} %{__python3} setup.py test %endif %if %{with python2} %files -n python2-logutils %license LICENSE.txt %doc README.rst NEWS.txt doc/ %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %endif %if %{with python3} %files -n python3-%{modname} %license LICENSE.txt %doc README.rst NEWS.txt doc/ %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}-* %endif %changelog * Fri Jan 18 2019 Javier Peña - 0.3.5-6.1 - Python3-only for RHEL 8 and Fedora. * Tue Jul 24 2018 Pierre-Yves Chibon - 0.3.5-6 - Use the py2 version of the macros * Sat Jul 14 2018 Fedora Release Engineering - 0.3.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 0.3.5-4 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 0.3.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.3.5-2 - Python 2 binary package renamed to python2-logutils See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Fri Aug 11 2017 Ralph Bean - 0.3.5-1 - new version * Thu Jul 27 2017 Fedora Release Engineering - 0.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 25 2017 Kevin Fenzi - 0.3.4-1 - Update to 0.3.4. Fixes bug #1425241 * Sat Feb 11 2017 Fedora Release Engineering - 0.3.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.3.3-8 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.3.3-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.3.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 0.3.3-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.3.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Kalev Lember - 0.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Wed Jan 29 2014 Ralph Bean - 0.3.3-1 - Latest upstream. - Modernized python3 conditional * Sun Aug 04 2013 Fedora Release Engineering - 0.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Dec 05 2012 Ralph Bean - 0.3.2-1 - Initial package for Fedora