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