2bc149e
%global pypi_name ansiwrap
2bc149e
2bc149e
Name:           python-%{pypi_name}
2bc149e
Version:        0.8.4
1cd7e99
Release:        6%{?dist}
2bc149e
Summary:        Text wrapper with ANSI colors and styles support
2bc149e
2bc149e
License:        ASL 2.0
2bc149e
URL:            https://github.com/jonathaneunice/ansiwrap
2bc149e
Source0:        %{pypi_source %{pypi_name} %{version} zip}
2bc149e
BuildArch:      noarch
2bc149e
2bc149e
%description
2bc149e
ansiwrap wraps text, like the standard textwrap module. But it also correctly
2bc149e
wraps text that contains ANSI control sequences that colorize or style text.
2bc149e
Where textwrap is fooled by the raw string length of those control codes,
2bc149e
ansiwrap is not; it understands that however much those codes affect color
2bc149e
and display style, they have no logical length.
2bc149e
2bc149e
%package -n     python3-%{pypi_name}
2bc149e
Summary:        %{summary}
2bc149e
2bc149e
BuildRequires:  python3-devel
2bc149e
BuildRequires:  python3-ansicolors
2bc149e
BuildRequires:  python3-coverage
2bc149e
BuildRequires:  python3-pytest
2bc149e
BuildRequires:  python3-pytest-cov
2bc149e
BuildRequires:  python3-setuptools
2bc149e
BuildRequires:  python3-textwrap3
2bc149e
BuildRequires:  python3-tox
2bc149e
%{?python_provide:%python_provide python3-%{pypi_name}}
2bc149e
2bc149e
%description -n python3-%{pypi_name}
2bc149e
ansiwrap wraps text, like the standard textwrap module. But it also correctly
2bc149e
wraps text that contains ANSI control sequences that colorize or style text.
2bc149e
Where textwrap is fooled by the raw string length of those control codes,
2bc149e
ansiwrap is not; it understands that however much those codes affect color
2bc149e
and display style, they have no logical length.
2bc149e
2bc149e
%prep
2bc149e
%autosetup -n %{pypi_name}-%{version}
2bc149e
rm -rf %{pypi_name}.egg-info
2bc149e
2bc149e
%build
2bc149e
%py3_build
2bc149e
2bc149e
%install
2bc149e
%py3_install
2bc149e
2bc149e
%check
2bc149e
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version} -v test
2bc149e
2bc149e
%files -n python3-%{pypi_name}
2bc149e
%license LICENSE.txt
2bc149e
%doc README.rst
2bc149e
%{python3_sitelib}/%{pypi_name}/
2bc149e
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
2bc149e
2bc149e
%changelog
1cd7e99
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-6
1cd7e99
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1cd7e99
11ad3bb
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-5
11ad3bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
11ad3bb
a085ea0
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.4-4
a085ea0
- Rebuilt for Python 3.10
a085ea0
6a215a9
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-3
6a215a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
6a215a9
a624a4c
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-2
a624a4c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a624a4c
2bc149e
* Tue May 12 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.8.4-1
2bc149e
- Initial package for Fedora