diff --git a/fire-0.4.0.tar.gz b/fire-0.4.0.tar.gz deleted file mode 100644 index 00a9917..0000000 --- a/fire-0.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5e2b8763699d1142393a46d0e3e790c5eb2f0706082df8f647878842c216a62 -size 87684 diff --git a/fire-0.5.0.tar.gz b/fire-0.5.0.tar.gz new file mode 100644 index 0000000..85a8c6a --- /dev/null +++ b/fire-0.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6 +size 88282 diff --git a/python-fire-no-mock.patch b/python-fire-no-mock.patch index 029aaff..59f95db 100644 --- a/python-fire-no-mock.patch +++ b/python-fire-no-mock.patch @@ -1,7 +1,7 @@ -Index: fire-0.4.0/fire/core_test.py +Index: fire-0.5.0/fire/core_test.py =================================================================== ---- fire-0.4.0.orig/fire/core_test.py 2020-04-03 19:14:51.000000000 +0200 -+++ fire-0.4.0/fire/core_test.py 2022-03-16 13:48:27.568077390 +0100 +--- fire-0.5.0.orig/fire/core_test.py ++++ fire-0.5.0/fire/core_test.py @@ -22,7 +22,11 @@ from fire import core from fire import test_components as tc from fire import testutils @@ -15,27 +15,26 @@ Index: fire-0.4.0/fire/core_test.py import six -Index: fire-0.4.0/fire/fire_import_test.py +Index: fire-0.5.0/fire/fire_import_test.py =================================================================== ---- fire-0.4.0.orig/fire/fire_import_test.py 2022-03-16 13:48:27.568077390 +0100 -+++ fire-0.4.0/fire/fire_import_test.py 2022-03-16 13:51:27.561140579 +0100 -@@ -18,7 +18,11 @@ import sys - - import fire - from fire import testutils --import mock -+ -+try: -+ import mock # python 2.x -+except ModuleNotFoundError: -+ from unittest import mock # python 3.x - - - class FireImportTest(testutils.BaseTestCase): -Index: fire-0.4.0/fire/fire_test.py +--- fire-0.5.0.orig/fire/fire_import_test.py ++++ fire-0.5.0/fire/fire_import_test.py +@@ -18,7 +18,10 @@ import sys + + import fire + from fire import testutils +-import mock ++try: ++ from unittest import mock ++except ImportError: ++ import mock + + + class FireImportTest(testutils.BaseTestCase): +Index: fire-0.5.0/fire/fire_test.py =================================================================== ---- fire-0.4.0.orig/fire/fire_test.py 2020-12-17 01:20:39.000000000 +0100 -+++ fire-0.4.0/fire/fire_test.py 2022-03-16 13:48:27.568077390 +0100 +--- fire-0.5.0.orig/fire/fire_test.py ++++ fire-0.5.0/fire/fire_test.py @@ -25,7 +25,10 @@ import fire from fire import test_components as tc from fire import testutils @@ -48,28 +47,27 @@ Index: fire-0.4.0/fire/fire_test.py import six -Index: fire-0.4.0/fire/interact_test.py +Index: fire-0.5.0/fire/interact_test.py =================================================================== ---- fire-0.4.0.orig/fire/interact_test.py 2022-03-16 13:48:27.568077390 +0100 -+++ fire-0.4.0/fire/interact_test.py 2022-03-16 13:50:36.080836493 +0100 -@@ -21,8 +21,10 @@ from __future__ import print_function - from fire import interact - from fire import testutils - --import mock -- -+try: -+ import mock # python 2.x -+except ModuleNotFoundError: -+ from unittest import mock # python 3.x - - try: - import IPython # pylint: disable=unused-import, g-import-not-at-top -Index: fire-0.4.0/fire/testutils.py +--- fire-0.5.0.orig/fire/interact_test.py ++++ fire-0.5.0/fire/interact_test.py +@@ -21,7 +21,10 @@ from __future__ import print_function + from fire import interact + from fire import testutils + +-import mock ++try: ++ from unittest import mock ++except ImportError: ++ import mock + + + try: +Index: fire-0.5.0/fire/testutils.py =================================================================== ---- fire-0.4.0.orig/fire/testutils.py 2020-12-17 01:20:39.000000000 +0100 -+++ fire-0.4.0/fire/testutils.py 2022-03-16 13:48:27.568077390 +0100 -@@ -28,7 +28,10 @@ import unittest +--- fire-0.5.0.orig/fire/testutils.py ++++ fire-0.5.0/fire/testutils.py +@@ -27,7 +27,10 @@ import unittest from fire import core from fire import trace diff --git a/python-fire.changes b/python-fire.changes index 08ec651..ff5810b 100644 --- a/python-fire.changes +++ b/python-fire.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Feb 7 01:05:45 UTC 2023 - Steve Kowalik + +- Update to 0.5.0: + * Support for custom serializers with fire.Fire(serializer=your_serializer) + * Auto-generated help text now shows short arguments (e.g. -a) when + appropriate + * Default values are now shown in help for kwonly arguments + * Completion script fix where previously completions might not show at all +- Refresh python-fire-no-mock.patch +- Add patch support-python-311.patch: + * Support Python 3.11 + ------------------------------------------------------------------- Wed Mar 16 12:52:10 UTC 2022 - pgajdos@suse.com diff --git a/python-fire.spec b/python-fire.spec index 7d68a8d..82b69ef 100644 --- a/python-fire.spec +++ b/python-fire.spec @@ -1,7 +1,7 @@ # # spec file for package python-fire # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,17 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-fire -Version: 0.4.0 +Version: 0.5.0 Release: 0 Summary: A library for automatically generating command line interfaces License: Apache-2.0 URL: https://github.com/google/python-fire Source: https://files.pythonhosted.org/packages/source/f/fire/fire-%{version}.tar.gz -# https://github.com/google/python-fire/pull/265/files +# Based on https://github.com/google/python-fire/pull/265/files Patch0: python-fire-no-mock.patch +Patch1: support-python-311.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -47,8 +47,7 @@ Python Fire is a library for automatically generating command line interfaces (CLIs) from a Python object. %prep -%setup -q -n fire-%{version} -%autopatch -p1 +%autosetup -p1 -n fire-%{version} %build %python_build diff --git a/support-python-311.patch b/support-python-311.patch new file mode 100644 index 0000000..e626fd2 --- /dev/null +++ b/support-python-311.patch @@ -0,0 +1,14 @@ +Index: fire-0.5.0/fire/test_components_py3.py +=================================================================== +--- fire-0.5.0.orig/fire/test_components_py3.py ++++ fire-0.5.0/fire/test_components_py3.py +@@ -57,8 +57,7 @@ def lru_cache_decorated(arg1): + + class WithAsyncio(object): + +- @asyncio.coroutine +- def double(self, count=0): ++ async def double(self, count=0): + return 2 * count + +