[packages/python3-cliff] - up to 4.9.1

baggins baggins at pld-linux.org
Tue Mar 25 10:51:41 CET 2025


commit d02cf835b8c6f423bc57b5e36fcdfdc6aad86b75
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Mar 25 10:45:42 2025 +0100

    - up to 4.9.1

 python-cliff-mock.patch        | 182 -----------------------------------------
 python-cliff-prettytable.patch |  23 ------
 python-cliff-py2-test.patch    |  23 ------
 python-cliff-py310.patch       |  11 ---
 python-cliff.spec              | 171 --------------------------------------
 python3-cliff.spec             |  82 +++++++++++++++++++
 6 files changed, 82 insertions(+), 410 deletions(-)
---
diff --git a/python-cliff.spec b/python-cliff.spec
deleted file mode 100644
index c1c518c..0000000
--- a/python-cliff.spec
+++ /dev/null
@@ -1,171 +0,0 @@
-#
-# Conditional build:
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-Summary:	Command Line Interface Formulation Framework
-Summary(pl.UTF-8):	Command Line Interface Formulation Framework - szkielet formułowania linii poleceń
-Name:		python-cliff
-# keep 2.x here for python2 support
-Version:	2.18.0
-Release:	4
-License:	Apache
-Group:		Libraries/Python
-Source0:	https://files.pythonhosted.org/packages/source/c/cliff/cliff-%{version}.tar.gz
-# Source0-md5:	66490f2c437f543f32afe9e518e3c080
-Patch0:		%{name}-prettytable.patch
-Patch1:		%{name}-mock.patch
-Patch2:		%{name}-py310.patch
-Patch3:		%{name}-py2-test.patch
-URL:		https://pypi.org/project/cliff/
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-pbr >= 2.0.0
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-PyYAML >= 3.12
-BuildRequires:	python-cmd2 >= 0.8.0
-BuildRequires:	python-coverage >= 4.0
-BuildRequires:	python-mock >= 2.0
-BuildRequires:	python-openstackdocstheme >= 1.11.0
-BuildRequires:	python-prettytable >= 0.7.2
-BuildRequires:	python-pyparsing >= 2.1.0
-BuildRequires:	python-six >= 1.10.0
-BuildRequires:	python-stevedore >= 1.20.0
-BuildRequires:	python-subunit >= 1.0.0
-BuildRequires:	python-testrepository >= 0.0.18
-BuildRequires:	python-testscenarios >= 0.4
-BuildRequires:	python-testtools >= 2.2.0
-BuildRequires:	python-unicodecsv >= 0.8.0
-BuildRequires:	sphinx-pdg-2 >= 1.7.0
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.6
-BuildRequires:	python3-pbr >= 2.0.0
-%if %{with tests}
-BuildRequires:	python3-PyYAML >= 3.12
-BuildRequires:	python3-cmd2 >= 0.8.0
-BuildRequires:	python3-coverage >= 4.0
-BuildRequires:	python3-openstackdocstheme >= 1.11.0
-BuildRequires:	python3-prettytable >= 0.7.2
-BuildRequires:	python3-pyparsing >= 2.1.0
-BuildRequires:	python3-six >= 1.10.0
-BuildRequires:	python3-stevedore >= 1.20.0
-BuildRequires:	python3-subunit >= 1.0.0
-BuildRequires:	python3-testrepository >= 0.0.18
-BuildRequires:	python3-testscenarios >= 0.4
-BuildRequires:	python3-testtools >= 2.2.0
-BuildRequires:	sphinx-pdg-3 >= 1.7.0
-%endif
-%endif
-BuildRequires:	sed >= 4.0
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-cliff is a framework for building command line programs. It uses
-setuptools entry points to provide subcommands, output formatters, and
-other extensions.
-
-%description -l pl.UTF-8
-cliff to szkielet do budowania programów działających z linii poleceń.
-Wykorzystuje punkty wejściowe setuptools do zapewnienia podpoleceń,
-funkcje formatujące wyjścia i inne rozszerzenia.
-
-%package -n python3-cliff
-Summary:	Command Line Interface Formulation Framework
-Summary(pl.UTF-8):	Command Line Interface Formulation Framework - szkielet formułowania linii poleceń
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.6
-
-%description -n python3-cliff
-cliff is a framework for building command line programs. It uses
-setuptools entry points to provide subcommands, output formatters, and
-other extensions.
-
-%description -n python3-cliff -l pl.UTF-8
-cliff to szkielet do budowania programów działających z linii poleceń.
-Wykorzystuje punkty wejściowe setuptools do zapewnienia podpoleceń,
-funkcje formatujące wyjścia i inne rozszerzenia.
-
-%prep
-%setup -q -n cliff-%{version}
-%patch -P 0 -p1
-%patch -P 1 -p1
-%patch -P 2 -p1
-%patch -P 3 -p1
-
-%build
-%if %{with python2}
-export PYTHON="%{__python}"
-%py_build %{?with_tests:test}
-
-%if %{with tests}
-%{__rm} -r .testrepository
-%endif
-%endif
-
-%if %{with python3}
-export PYTHON="%{__python3}"
-%py3_build %{?with_tests:test}
-
-%if %{with tests}
-%{__rm} -r .testrepository
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/cliff/tests
-%endif
-
-%if %{with python3}
-%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/cliff/tests
-%endif
-
-%if %{with python2}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version}
-cp -a demoapp/* $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version} -name '*.py' \
-	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
-%endif
-%if %{with python3}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
-cp -a demoapp/* $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version} -name '*.py' \
-	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.rst
-%{py_sitescriptdir}/cliff
-%{py_sitescriptdir}/cliff-%{version}-py*.egg-info
-%{_examplesdir}/python-cliff-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-cliff
-%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.rst
-%{py3_sitescriptdir}/cliff
-%{py3_sitescriptdir}/cliff-%{version}-py*.egg-info
-%{_examplesdir}/python3-cliff-%{version}
-%endif
diff --git a/python3-cliff.spec b/python3-cliff.spec
new file mode 100644
index 0000000..775ed80
--- /dev/null
+++ b/python3-cliff.spec
@@ -0,0 +1,82 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Command Line Interface Formulation Framework
+Summary(pl.UTF-8):	Command Line Interface Formulation Framework - szkielet formułowania linii poleceń
+Name:		python3-cliff
+Version:	4.9.1
+Release:	1
+License:	Apache
+Group:		Libraries/Python
+Source0:	https://files.pythonhosted.org/packages/source/c/cliff/cliff-%{version}.tar.gz
+# Source0-md5:	7f6a2a8046eb190aaaff1adf5fed2f27
+URL:		https://pypi.org/project/cliff/
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-pbr >= 2.0.0
+%if %{with tests}
+BuildRequires:	python3-PyYAML >= 3.12
+BuildRequires:	python3-cmd2 >= 0.8.0
+BuildRequires:	python3-coverage >= 4.0
+BuildRequires:	python3-openstackdocstheme >= 1.11.0
+BuildRequires:	python3-prettytable >= 0.7.2
+BuildRequires:	python3-pyparsing >= 2.1.0
+BuildRequires:	python3-six >= 1.10.0
+BuildRequires:	python3-stevedore >= 2.0.1
+BuildRequires:	python3-subunit >= 1.0.0
+BuildRequires:	python3-testrepository >= 0.0.18
+BuildRequires:	python3-testscenarios >= 0.4
+BuildRequires:	python3-testtools >= 2.2.0
+BuildRequires:	sphinx-pdg-3 >= 1.7.0
+%endif
+BuildRequires:	sed >= 4.0
+Requires:	python3-modules >= 1:3.9
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+cliff is a framework for building command line programs. It uses
+setuptools entry points to provide subcommands, output formatters, and
+other extensions.
+
+%description -l pl.UTF-8
+cliff to szkielet do budowania programów działających z linii poleceń.
+Wykorzystuje punkty wejściowe setuptools do zapewnienia podpoleceń,
+funkcje formatujące wyjścia i inne rozszerzenia.
+
+%prep
+%setup -q -n cliff-%{version}
+
+%build
+export PYTHON="%{__python3}"
+%py3_build %{?with_tests:test}
+
+%if %{with tests}
+%{__rm} -r .testrepository
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/cliff/tests
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
+cp -a demoapp/* $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version} -name '*.py' \
+	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst
+%{py3_sitescriptdir}/cliff
+%{py3_sitescriptdir}/cliff-%{version}-py*.egg-info
+%{_examplesdir}/python3-cliff-%{version}
diff --git a/python-cliff-mock.patch b/python-cliff-mock.patch
deleted file mode 100644
index b3d95b5..0000000
--- a/python-cliff-mock.patch
+++ /dev/null
@@ -1,182 +0,0 @@
---- cliff-2.18.0/cliff/tests/test_app.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_app.py	2024-01-16 20:07:52.707414769 +0100
-@@ -21,7 +21,10 @@ except ImportError:
-     from io import StringIO
- import sys
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import six
- 
- from cliff import app as application
---- cliff-2.18.0/cliff/tests/test_command_hooks.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_command_hooks.py	2024-01-16 20:08:13.197303765 +0100
-@@ -18,7 +18,10 @@ from cliff import lister
- from cliff import show
- from cliff.tests import base
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- from stevedore import extension
- 
- 
---- cliff-2.18.0/cliff/tests/test_commandmanager.py.orig	2024-01-16 20:08:35.477183065 +0100
-+++ cliff-2.18.0/cliff/tests/test_commandmanager.py	2024-01-16 20:08:38.507166650 +0100
-@@ -10,7 +10,10 @@
- #  License for the specific language governing permissions and limitations
- #  under the License.
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import testscenarios
- 
- from cliff import command
---- cliff-2.18.0/cliff/tests/test_complete.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_complete.py	2024-01-16 20:09:30.896882831 +0100
-@@ -13,7 +13,10 @@
- """Bash completion tests
- """
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from cliff import app as application
- from cliff import commandmanager
---- cliff-2.18.0/cliff/tests/test_formatters_csv.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_formatters_csv.py	2024-01-16 20:09:46.763463541 +0100
-@@ -16,7 +16,10 @@
- import argparse
- import unittest
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import six
- 
- from cliff.formatters import commaseparated
---- cliff-2.18.0/cliff/tests/test_formatters_json.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_formatters_json.py	2024-01-16 20:10:12.289991918 +0100
-@@ -18,7 +18,10 @@ from cliff.formatters import json_format
- from cliff.tests import base
- from cliff.tests import test_columns
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import six
- 
- 
---- cliff-2.18.0/cliff/tests/test_formatters_shell.py.orig	2024-01-16 20:10:30.733225336 +0100
-+++ cliff-2.18.0/cliff/tests/test_formatters_shell.py	2024-01-16 20:10:36.759859354 +0100
-@@ -19,7 +19,10 @@ from cliff.formatters import shell
- from cliff.tests import base
- from cliff.tests import test_columns
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- 
- class TestShellFormatter(base.TestBase):
---- cliff-2.18.0/cliff/tests/test_formatters_table.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_formatters_table.py	2024-01-16 20:10:55.843089304 +0100
-@@ -16,7 +16,10 @@ import argparse
- import os
- import textwrap
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- from six import StringIO
- 
- from cliff.formatters import table
---- cliff-2.18.0/cliff/tests/test_formatters_yaml.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_formatters_yaml.py	2024-01-16 20:11:10.639675811 +0100
-@@ -19,7 +19,10 @@ from cliff.formatters import yaml_format
- from cliff.tests import base
- from cliff.tests import test_columns
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- 
- class TestYAMLFormatter(base.TestBase):
---- cliff-2.18.0/cliff/tests/test_help.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_help.py	2024-01-16 20:11:20.262957010 +0100
-@@ -17,7 +17,10 @@ except ImportError:
- import os
- import sys
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from cliff import app as application
- from cliff import commandmanager
---- cliff-2.18.0/cliff/tests/test_lister.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_lister.py	2024-01-16 20:11:28.762910962 +0100
-@@ -17,7 +17,10 @@ import weakref
- from cliff import lister
- from cliff.tests import base
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- 
- class FauxFormatter(object):
---- cliff-2.18.0/cliff/tests/test_show.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_show.py	2024-01-16 20:11:54.516104778 +0100
-@@ -17,7 +17,10 @@ import weakref
- from cliff import show
- from cliff.tests import base
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- 
- class FauxFormatter(object):
---- cliff-2.18.0/cliff/tests/test_utils.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/tests/test_utils.py	2024-01-16 20:12:03.082725036 +0100
-@@ -17,7 +17,10 @@ import struct
- import sys
- import unittest
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from cliff import utils
- from cliff.tests import base
diff --git a/python-cliff-prettytable.patch b/python-cliff-prettytable.patch
deleted file mode 100644
index e49f6cc..0000000
--- a/python-cliff-prettytable.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- cliff-2.18.0/requirements.txt.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/requirements.txt	2024-01-16 19:44:20.708397557 +0100
-@@ -3,7 +3,7 @@
- # process, which may cause wedges in the gate later.
- pbr!=2.1.0,>=2.0.0 # Apache-2.0
- cmd2>=0.8.0,!=0.8.3,<0.9.0 # MIT
--PrettyTable<0.8,>=0.7.2 # BSD
-+PrettyTable>=0.7.2 # BSD
- pyparsing>=2.1.0 # MIT
- six>=1.10.0 # MIT
- stevedore>=1.20.0 # Apache-2.0
---- cliff-2.18.0/cliff/formatters/table.py.orig	2020-01-08 21:36:15.000000000 +0100
-+++ cliff-2.18.0/cliff/formatters/table.py	2024-01-16 19:45:25.351380690 +0100
-@@ -176,9 +176,6 @@ class TableFormatter(base.ListFormatter,
- 
-     @staticmethod
-     def _assign_max_widths(stdout, x, max_width, min_width=0, fit_width=False):
--        if min_width:
--            x.min_width = min_width
--
-         if max_width > 0:
-             term_width = max_width
-         elif not fit_width:
diff --git a/python-cliff-py2-test.patch b/python-cliff-py2-test.patch
deleted file mode 100644
index 993ea6d..0000000
--- a/python-cliff-py2-test.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-It fails now - something changed in codecs or six?
-There is no fix to backport because cliff>=3 dropped py2 support
---- cliff-2.18.0/cliff/tests/test_app.py.orig	2024-01-16 20:52:28.136254060 +0100
-+++ cliff-2.18.0/cliff/tests/test_app.py	2024-01-16 20:58:52.597504588 +0100
-@@ -525,18 +525,6 @@ class TestIO(base.TestBase):
-         text_utf8 = text.encode('utf-8')
- 
-         if six.PY2:
--            # In PY2 StreamWriter can't accept non-ASCII encoded characters
--            # because it must first promote the encoded byte stream to
--            # unicode in order to encode it in the desired encoding.
--            # Because the encoding of the byte stream is not known at this
--            # point the default-encoding of ASCII is utilized, but you can't
--            # decode a non-ASCII charcater to ASCII.
--            io = six.StringIO()
--            writer = codecs.getwriter('utf-8')(io)
--            self.assertRaises(UnicodeDecodeError,
--                              writer.write,
--                              text_utf8)
--
-             # In PY2 with our override of codecs.getwriter we do not
-             # attempt to encode bytes in a str object (only unicode
-             # objects) therefore the final output string should be the
diff --git a/python-cliff-py310.patch b/python-cliff-py310.patch
deleted file mode 100644
index 3bc67ed..0000000
--- a/python-cliff-py310.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cliff-2.18.0/cliff/tests/test_help.py.orig	2024-01-16 20:13:24.252285303 +0100
-+++ cliff-2.18.0/cliff/tests/test_help.py	2024-01-16 20:49:44.113809312 +0100
-@@ -107,7 +107,7 @@ class TestHelp(base.TestBase):
-         help_text = stdout.getvalue()
-         basecommand = os.path.split(sys.argv[0])[1]
-         self.assertIn('usage: %s [--version]' % basecommand, help_text)
--        self.assertIn('optional arguments:\n  --version', help_text)
-+        self.assertRegex(help_text, 'option(s|al arguments):\n  --version', help_text)
-         expected = (
-             '  one            Test command.\n'
-             '  three word command  Test command.\n'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-cliff.git/commitdiff/d02cf835b8c6f423bc57b5e36fcdfdc6aad86b75



More information about the pld-cvs-commit mailing list