|
|
f4a4764 |
%global srcname coloredlogs
|
|
|
f4a4764 |
|
|
|
f4a4764 |
Name: python-%{srcname}
|
|
|
f4a4764 |
Version: 10.0
|
|
|
f4a4764 |
Release: 7%{?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 |
# Submitted upstream as xolox/python-coloredlogs#69
|
|
|
f4a4764 |
Patch0: %{name}-10.0-test-timezone.patch
|
|
|
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}
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-capturer
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-humanfriendly
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-mock
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
f4a4764 |
BuildRequires: python%{python3_pkgversion}-verboselogs
|
|
|
f4a4764 |
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
f4a4764 |
|
|
|
f4a4764 |
%if %{undefined python_disable_dependency_generator}
|
|
|
f4a4764 |
Requires: python%{python3_pkgversion}-humanfriendly
|
|
|
f4a4764 |
%endif # python_disable_dependency_generator
|
|
|
f4a4764 |
|
|
|
f4a4764 |
%if 0%{?fedora}
|
|
|
f4a4764 |
Suggests: %{name}-doc = %{version}-%{release}
|
|
|
f4a4764 |
%endif # fedora
|
|
|
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 |
%if 0%{?python3_version_nodots} >= 37
|
|
|
f4a4764 |
--deselect %{srcname}/tests.py::ColoredLogsTestCase::test_plain_text_output_format \
|
|
|
f4a4764 |
%endif
|
|
|
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
|
|
|
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
|