14
0
Files
python-colorclass/python-colorclass.spec
Matej Cepl 29b63a3a3a Accepting request 946242 from home:bnavigator:branches:devel:languages:python
- Update to 2.2.2
  * no release notes
  * new maintainer, new Github repository
  * PEP517 style build with poetry backend
  * Python 3.10 support by collections.abc import fix

OBS-URL: https://build.opensuse.org/request/show/946242
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-colorclass?expand=0&rev=6
2022-01-14 08:50:39 +00:00

67 lines
2.0 KiB
RPMSpec

#
# spec file for package python-colorclass
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-colorclass
Version: 2.2.2
Release: 0
Summary: ANSI text color library for Python
License: MIT
Group: Development/Languages/Python
URL: https://github.com/matthewdeanmartin/colorclass/
Source: https://github.com/matthewdeanmartin/colorclass/archive/refs/tags/v%{version}.tar.gz#/colorclass-%{version}-gh.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
Yet another ANSI color text library for Python. It provides "auto
colors" for dark/light terminals.
In Python 2.x, this library subclasses `unicode`, while on
Python 3.x, it subclasses `str`.
%prep
%setup -q -n colorclass-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%{python_expand #
# show rpmlint a non-empty metadata file (poetry creates those)
echo " " >> %{buildroot}%{$python_sitelib}/colorclass-%{version}.dist-info/entry_points.txt
# standard dedup
%fdupes %{buildroot}%{$python_sitelib}
}
%check
%pytest -k 'not test_piped'
%files %{python_files}
%{python_sitelib}/colorclass
%{python_sitelib}/colorclass-%{version}.dist-info
%changelog