%global srcname coloredlogs Name: python-%{srcname} Version: 15.0.1 Release: 10%{?dist} Summary: Colored terminal output for Python's logging module License: MIT URL: https://%{srcname}.readthedocs.io Source0: https://github.com/xolox/%{name}/archive/%{version}/%{name}-%{version}.tar.gz # Replace pipes.quote with shlex.quote on Python 3 # https://github.com/xolox/python-coloredlogs/pull/120 # # Fixes: # # Relies on the pipes module, removed from the standard library in Python 3.13 # https://github.com/xolox/python-coloredlogs/issues/119 Patch: https://github.com/xolox/%{name}/pull/120.patch BuildArch: noarch %description The coloredlogs package enables colored terminal output for Python's logging module. The ColoredFormatter class inherits from logging.Formatter and uses ANSI escape sequences to render your logging messages in color. It uses only standard colors so it should work on any UNIX terminal. %package doc Summary: Documentation for the '%{srcname}' Python module BuildRequires: python%{python3_pkgversion}-sphinx %description doc HTML documentation for the '%{srcname}' Python module. %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-capturer >= 2.4 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-humanfriendly >= 9.1 BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-verboselogs >= 1.7 %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %if %{undefined __pythondist_requires} Requires: python%{python3_pkgversion}-humanfriendly >= 9.1 %endif %if !0%{?rhel} || 0%{?rhel} >= 8 Suggests: %{name}-doc = %{version}-%{release} %endif %description -n python%{python3_pkgversion}-%{srcname} The coloredlogs package enables colored terminal output for Python's logging module. The ColoredFormatter class inherits from logging.Formatter and uses ANSI escape sequences to render your logging messages in color. It uses only standard colors so it should work on any UNIX terminal. %prep %autosetup -p1 %build %py3_build # Don't install tests.py rm build/lib/%{srcname}/tests.py sphinx-build-%{python3_version} -nb html -d docs/build/doctrees docs docs/build/html rm docs/build/html/.buildinfo %install %py3_install %check # Some hacking to get the pth file to get processed outside # of the build host's site dir. This sitecustomize.py needs # to be somewhere in the path. mkdir -p fakesite echo "import site; site.addsitedir(site.USER_SITE)" > fakesite/sitecustomize.py PATH=%{buildroot}%{_bindir}:$PATH \ PYTHONPATH=$PWD/fakesite \ PYTHONUSERBASE=%{buildroot}%{_prefix} \ PYTHONUNBUFFERED=1 \ py.test-%{python3_version} \ %{srcname}/tests.py %files doc %license LICENSE.txt %doc docs/build/html %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc CHANGELOG.rst README.rst %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %{python3_sitelib}/%{srcname}.pth %{_bindir}/%{srcname} %changelog * Fri Jul 19 2024 Fedora Release Engineering - 15.0.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed Jun 12 2024 Benjamin A. Beasley - 15.0.1-9 - Rebuilt for Python 3.13 (close RHBZ#2291652) - Applied a simple patch for 'pipes' module removal in Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 15.0.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 15.0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 15.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 15 2023 Python Maint - 15.0.1-5 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 15.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 15.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 15.0.1-2 - Rebuilt for Python 3.11 * Wed Apr 27 2022 Scott K Logan - 15.0.1-1 - Update to 15.0.1 (rhbz#1906418) * Fri Jan 21 2022 Fedora Release Engineering - 14.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 14.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 14.0-5 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 14.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 14.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 14.0-2 - Rebuilt for Python 3.9 * Wed Apr 15 2020 Scott K Logan - 14.0-1 - Update to 14.0 (rhbz#1803324) * Thu Jan 30 2020 Fedora Release Engineering - 10.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 10.0-10 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 10.0-9 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 10.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Mar 18 2019 Scott K Logan - 10.0-7 - Drop python2 and python3_other - Deselect plain_text test on Python >= 3.7 (xolox/python-coloredlogs#66) * Fri Oct 26 2018 Scott K Logan - 10.0-6 - Pattern conformance * Fri Sep 28 2018 Scott K Logan - 10.0-5 - Disable python2 for Fedora 30+ - Better conditionals in spec - Enable tests * Fri Sep 21 2018 Scott K Logan - 10.0-4 - Enable both python34 and python36 for EPEL * Fri Sep 21 2018 Scott K Logan - 10.0-3 - Add missing setuptools BR for EPEL * Fri Sep 21 2018 Scott K Logan - 10.0-2 - Enable python34 builds for EPEL * Thu Sep 20 2018 Scott K Logan - 10.0-1 - Initial package