15
0

Accepting request 700449 from home:TheBlackCat:branches:devel:languages:python:jupyter

Textwrap, but savvy to ANSI colors and styles

OBS-URL: https://build.opensuse.org/request/show/700449
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansiwrap?expand=0&rev=1
This commit is contained in:
Todd R
2019-05-03 16:56:06 +00:00
committed by Git OBS Bridge
commit 421095b20c
5 changed files with 105 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
ansiwrap-0.8.4.zip Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7
size 17666

4
python-ansiwrap.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Fri Apr 20 20:37:59 UTC 2018 - toddrme2178@gmail.com
- Initial version

74
python-ansiwrap.spec Normal file
View File

@@ -0,0 +1,74 @@
#
# spec file for package python-ansiwrap
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-ansiwrap
Version: 0.8.4
Release: 0
Summary: Textwrap, but savvy to ANSI colors and styles
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/jonathaneunice/ansiwrap
Source: https://files.pythonhosted.org/packages/source/a/ansiwrap/ansiwrap-%{version}.zip
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
# SECTION test requirements
BuildRequires: %{python_module ansicolors >= 1.1.8}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module textwrap3}
BuildRequires: %{python_module tox}
# /SECTION
Requires: python-textwrap3
BuildArch: noarch
%python_subpackages
%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.
%prep
%setup -q -n ansiwrap-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
%files %{python_files}
%doc AUTHORS CHANGES.yml README.rst
%license LICENSE.txt
%{python_sitelib}/*
%changelog