forked from pool/python-coloredlogs
Accepting request 603495 from devel:languages:python:misc
Needed by python-spyder-terminal OBS-URL: https://build.opensuse.org/request/show/603495 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coloredlogs?expand=0&rev=1
This commit is contained in:
90
python-coloredlogs.spec
Normal file
90
python-coloredlogs.spec
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# spec file for package python-coloredlogs
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_with test
|
||||
Name: python-coloredlogs
|
||||
Version: 7.3
|
||||
Release: 0
|
||||
License: MIT
|
||||
Summary: Colored terminal output for Python's logging module
|
||||
Url: https://coloredlogs.readthedocs.io
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/c/coloredlogs/coloredlogs-%{version}.tar.gz
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module humanfriendly >= 3.2}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module capturer >= 2.4}
|
||||
BuildRequires: %{python_module mock >= 1.0.1}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytest-cov >= 2.3.1}
|
||||
BuildRequires: %{python_module verboselogs}
|
||||
%endif
|
||||
Requires: python-capturer >= 2.4
|
||||
Requires: python-humanfriendly >= 3.2
|
||||
Recommends: python-verboselogs
|
||||
BuildArch: noarch
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%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. It's currently tested
|
||||
on Python 2.6, 2.7, 3.4, 3.5 and PyPy. On Windows `coloredlogs` automatically
|
||||
pulls in Colorama_ as a dependency and enables ANSI escape sequence translation
|
||||
using Colorama.
|
||||
|
||||
%prep
|
||||
%setup -q -n coloredlogs-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/coloredlogs
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%post
|
||||
%python_install_alternative coloredlogs
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative coloredlogs
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_exec setup.py test
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.rst LICENSE.txt
|
||||
%python_alternative %{_bindir}/coloredlogs
|
||||
%{python_sitelib}/coloredlogs/
|
||||
%{python_sitelib}/coloredlogs.pth
|
||||
%{python_sitelib}/coloredlogs-%{version}-py*.egg-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user