From 6b983676fd07988dec1f53dddac5579d77ff47df Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 7 Oct 2024 21:10:33 +0300 Subject: [PATCH] import python-colorama-0.4.6-3.el9 --- .gitignore | 1 + .python-colorama.metadata | 1 + SPECS/python-colorama.spec | 92 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .gitignore create mode 100644 .python-colorama.metadata create mode 100644 SPECS/python-colorama.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7aec57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/colorama-0.4.6.tar.gz diff --git a/.python-colorama.metadata b/.python-colorama.metadata new file mode 100644 index 0000000..43f1067 --- /dev/null +++ b/.python-colorama.metadata @@ -0,0 +1 @@ +aa1fc7722b9128a3c945048de03f5b4e55157c6a SOURCES/colorama-0.4.6.tar.gz diff --git a/SPECS/python-colorama.spec b/SPECS/python-colorama.spec new file mode 100644 index 0000000..d4e4a50 --- /dev/null +++ b/SPECS/python-colorama.spec @@ -0,0 +1,92 @@ +%global pypi_name colorama + +Name: python-%{pypi_name} +Version: 0.4.6 +Release: 3%{?dist} +Summary: Cross-platform colored terminal text + +License: BSD-3-Clause +URL: https://github.com/tartley/colorama +Source0: %{url}/archive/%{version}/colorama-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(pytest) + + +%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. + +%package -n python3-%{pypi_name} +Summary: Cross-platform colored terminal text + +%description -n python3-%{pypi_name} +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. + +%prep +%autosetup -n %{pypi_name}-%{version} + +# Upstram uses a pyproject.toml that the version of setuptools in RHEL 9 cannot parse. +# It also depends on hatch for packaging, which is not available in RHEL 9. +tail -n +5 pyproject.toml > pyproject.toml_fixed +mv pyproject.toml_fixed pyproject.toml + +%if %{defined el9} +cat << EOF > setup.py +import setuptools +setuptools.setup( + version="%{version}" +) +EOF + +cat << EOF > setup.cfg +[metadata] +name = colorama + +[options] +packages=find: +EOF +%endif + +%generate_buildrequires +%pyproject_buildrequires -r + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files colorama + +%check +%pytest + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc CHANGELOG.rst README.rst +%license LICENSE.txt + +%changelog +* Thu May 09 2024 Major Hayden - 0.4.6-3 +- Add gating.yaml + +* Thu May 09 2024 Major Hayden - 0.4.6-2 +- Remove autorelease from the spec file + +* Wed May 1 2024 Major Hayden - 0.4.6-1 +- Initial RHEL 9 package.