forked from pool/python-ansiwrap
- Add patch drop-textwrap3.patch:
* Use textwrap, textwrap3 is a backport for Python < 3.6. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansiwrap?expand=0&rev=7
This commit is contained in:
42
drop-textwrap3.patch
Normal file
42
drop-textwrap3.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
Index: ansiwrap-0.8.4/ansiwrap/core.py
|
||||
===================================================================
|
||||
--- ansiwrap-0.8.4.orig/ansiwrap/core.py
|
||||
+++ ansiwrap-0.8.4/ansiwrap/core.py
|
||||
@@ -5,10 +5,10 @@ import re
|
||||
import sys
|
||||
import importlib
|
||||
|
||||
-# import a copy of textwrap3 which we will viciously monkey-patch
|
||||
+# import a copy of textwrap which we will viciously monkey-patch
|
||||
# to use our version of len, not the built-in
|
||||
import os
|
||||
-a_textwrap = importlib.import_module('textwrap3')
|
||||
+a_textwrap = importlib.import_module('textwrap')
|
||||
|
||||
|
||||
__all__ = 'wrap fill shorten strip_color ansilen ansi_terminate_lines'.split()
|
||||
Index: ansiwrap-0.8.4/setup.py
|
||||
===================================================================
|
||||
--- ansiwrap-0.8.4.orig/setup.py
|
||||
+++ ansiwrap-0.8.4/setup.py
|
||||
@@ -23,7 +23,7 @@ setup(
|
||||
license='Apache License 2.0',
|
||||
packages=['ansiwrap'],
|
||||
setup_requires=[],
|
||||
- install_requires=['textwrap3>=0.9.2'],
|
||||
+ install_requires=["textwrap3>=0.9.2; python_version < '3.6'"],
|
||||
tests_require=['tox', 'pytest', 'ansicolors>=1.1.8', 'coverage', 'pytest-cov'],
|
||||
test_suite="test",
|
||||
zip_safe=False,
|
||||
Index: ansiwrap-0.8.4/test/test_ansiwrap.py
|
||||
===================================================================
|
||||
--- ansiwrap-0.8.4.orig/test/test_ansiwrap.py
|
||||
+++ ansiwrap-0.8.4/test/test_ansiwrap.py
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
-import textwrap3 as textwrap
|
||||
+import textwrap
|
||||
from colors import * # must come before ansiwrap import
|
||||
# so ansiwrap's better strip_color prevails
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 19 06:44:55 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch drop-textwrap3.patch:
|
||||
* Use textwrap, textwrap3 is a backport for Python < 3.6.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 16 03:29:03 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ URL: https://github.com/jonathaneunice/ansiwrap
|
||||
Source: https://files.pythonhosted.org/packages/source/a/ansiwrap/ansiwrap-%{version}.zip
|
||||
# PATCH-FIX-UPSTREAM gh#jonathaneunice/ansiwrap#20
|
||||
Patch0: support-python312.patch
|
||||
# PATCH-FIX-UPSTREAM Based on gh#jonathaneunice/ansiwrap#16
|
||||
Patch1: drop-textwrap3.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@@ -34,7 +36,6 @@ BuildRequires: unzip
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module ansicolors >= 1.1.8}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module textwrap3}
|
||||
# /SECTION
|
||||
Requires: python-textwrap3
|
||||
BuildArch: noarch
|
||||
|
||||
Reference in New Issue
Block a user