From 421095b20ca75703ec79a5ca383999224272db1bb3f9572f69b33a83814b218f Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 3 May 2019 16:56:06 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + ansiwrap-0.8.4.zip | 3 ++ python-ansiwrap.changes | 4 +++ python-ansiwrap.spec | 74 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ansiwrap-0.8.4.zip create mode 100644 python-ansiwrap.changes create mode 100644 python-ansiwrap.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ansiwrap-0.8.4.zip b/ansiwrap-0.8.4.zip new file mode 100644 index 0000000..1e8f3d4 --- /dev/null +++ b/ansiwrap-0.8.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7 +size 17666 diff --git a/python-ansiwrap.changes b/python-ansiwrap.changes new file mode 100644 index 0000000..b4593e2 --- /dev/null +++ b/python-ansiwrap.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Apr 20 20:37:59 UTC 2018 - toddrme2178@gmail.com + +- Initial version diff --git a/python-ansiwrap.spec b/python-ansiwrap.spec new file mode 100644 index 0000000..9ea4582 --- /dev/null +++ b/python-ansiwrap.spec @@ -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