From 2bc149e2e6bade59ab24a123c25c9a2f522b776c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Jun 25 2020 21:36:12 +0000 Subject: * Tue May 12 2020 Fabian Affolter - 0.8.4-1 - Initial package for Fedora --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f5019d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ansiwrap-0.8.4.zip diff --git a/python-ansiwrap.spec b/python-ansiwrap.spec new file mode 100644 index 0000000..173548e --- /dev/null +++ b/python-ansiwrap.spec @@ -0,0 +1,61 @@ +%global pypi_name ansiwrap + +Name: python-%{pypi_name} +Version: 0.8.4 +Release: 1%{?dist} +Summary: Text wrapper with ANSI colors and styles support + +License: ASL 2.0 +URL: https://github.com/jonathaneunice/ansiwrap +Source0: %{pypi_source %{pypi_name} %{version} zip} +BuildArch: noarch + +%description +ansiwrap wraps text, like the standard textwrap module. But it also correctly +wraps text that contains ANSI control sequences that colorize or style text. +Where textwrap is fooled by the raw string length of those control codes, +ansiwrap is not; it understands that however much those codes affect color +and display style, they have no logical length. + +%package -n python3-%{pypi_name} +Summary: %{summary} + +BuildRequires: python3-devel +BuildRequires: python3-ansicolors +BuildRequires: python3-coverage +BuildRequires: python3-pytest +BuildRequires: python3-pytest-cov +BuildRequires: python3-setuptools +BuildRequires: python3-textwrap3 +BuildRequires: python3-tox +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +ansiwrap wraps text, like the standard textwrap module. But it also correctly +wraps text that contains ANSI control sequences that colorize or style text. +Where textwrap is fooled by the raw string length of those control codes, +ansiwrap is not; it understands that however much those codes affect color +and display style, they have no logical length. + +%prep +%autosetup -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%install +%py3_install + +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version} -v test + +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc README.rst +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Tue May 12 2020 Fabian Affolter - 0.8.4-1 +- Initial package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..430f13c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ansiwrap-0.8.4.zip) = 82227003a516b106145daf4592c2fc8278d2c0fcec3274c679431f1b6ead3d63fc90ef6e25ae8cc88791ef1baee74857f3762c3f339fe438a2f5054ad4f933d5