forked from pool/python-colorama
* https://github.com/tartley/colorama/pull/139 Add alternative to 'init()', called 'just_fix_windows_console'. This fixes many longstanding problems with 'init', such as working incorrectly on modern Windows terminals, and wonkiness when init gets called multiple times. The intention is that it just makes all Windows terminals treat ANSI the same way as other terminals do. Many thanks the njsmith for fixing our messes. * https://github.com/tartley/colorama/pull/352 Support Windows 10's ANSI/VT console. This didn't exist when Colorama was created, and avoiding us causing havok there is long overdue. Thanks to segeviner for the initial approach, and to njsmith for getting it merged. * https://github.com/tartley/colorama/pull/338 Internal overhaul of package metadata declaration, which abolishes our use of the now heavily discouraged setuptools (and hence setup.py, setup.cfg and MANIFEST.in), in favor of hatchling (and hence pyproject.toml), generously contributed by ofek (author of hatchling). This includes dropping support Python3.5 and 3.6, which are EOL, and were already dropped from setuptools, so this should not affect our users. * https://github.com/tartley/colorama/pull/353 Attention to detail award to LqdBcnAtWork for a spelling fix in demo06 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-colorama?expand=0&rev=32
76 lines
2.6 KiB
RPMSpec
76 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package python-colorama
|
|
#
|
|
# 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-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-colorama
|
|
Version: 0.4.6
|
|
Release: 0
|
|
Summary: Cross-platform colored terminal text
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/tartley/colorama
|
|
Source: https://github.com/tartley/colorama/archive/%{version}.tar.gz
|
|
BuildRequires: %{python_module hatchling}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Makes ANSI escape character sequences, for producing colored terminal text and
|
|
cursor positioning, work under MS Windows.
|
|
|
|
ANSI escape character sequences have long been used to produce colored terminal
|
|
text and cursor positioning on Unix and Macs. Colorama makes this work on
|
|
Windows, too. It also provides some shortcuts to help generate ANSI sequences,
|
|
and works fine in conjunction with any other ANSI sequence generation library,
|
|
such as Termcolor.
|
|
|
|
This has the upshot of providing a simple cross-platform API for printing
|
|
colored terminal text from Python, and has the happy side-effect that existing
|
|
applications or libraries which use ANSI sequences to produce colored output on
|
|
Linux or Macs can now also work on Windows, simply by calling colorama.init().
|
|
|
|
%prep
|
|
%setup -q -n colorama-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%python_expand script -eqc "pytest-%{$python_version} -vv -s" /dev/null
|
|
|
|
%files %{python_files}
|
|
%license LICENSE.txt
|
|
%doc CHANGELOG.rst README.rst
|
|
%doc demos/
|
|
%dir %{python_sitelib}/colorama
|
|
%{python_sitelib}/colorama/*
|
|
%{python_sitelib}/colorama-%{version}*.dist-info
|
|
|
|
%changelog
|