From 8f8d8405285a41f3171c401488fbda18d4c821562d949d04a1e9217f61e02cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 30 Jul 2019 08:13:31 +0000 Subject: [PATCH] Accepting request 719771 from home:pgajdos - version update to 0.2.0 * Help and usage screens * Help screens now have a man-page appearance and are shown with less-style pagination. Usage screens are shown when a user-error is encountered. The help and usage screens are considerably cleaner than the default output in previous versions of Fire. * Custom serialization * If you define a custom __str__ method on an object, that will be used to serialize the object when it is the final result of a Fire command. This means better support for numpy arrays, and better support for custom types. * Docstring parsing * Notably, docstrings are parsed in order to determine the descriptions to use for arguments in the help screens. We largely support (but not fully) Google, numpy, and RST style docstrings. These are the three most common styles of docstring used in Python code. * Access --help naturally * You no longer need to separate --help from your command with an extra --. Simply running command -h or command --help will give help, provided there isn't an argument named help in your component. * NamedTuples can be indexed both by their field names and by their indexes. * Callable objects can both be called, and their members can be accessed. * You must use flag syntax to call a callable object; you cannot pass their arguments positionally. * Single-hyphen flags are supported * You can now specify -flag instead of --flag if preferred. Both work. * Short-flags are permitted when their use is unambiguous * E.g. if your function has argument alpha, then you can specify its value with -a. * Fish completion support - deleted patches - fix-issue-164.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/719771 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=9 --- fire-0.1.3.tar.gz | 3 --- fire-0.2.0.tar.gz | 3 +++ fix-issue-164.patch | 57 --------------------------------------------- python-fire.changes | 23 ++++++++++++++++++ python-fire.spec | 8 +++---- 5 files changed, 30 insertions(+), 64 deletions(-) delete mode 100644 fire-0.1.3.tar.gz create mode 100644 fire-0.2.0.tar.gz delete mode 100644 fix-issue-164.patch diff --git a/fire-0.1.3.tar.gz b/fire-0.1.3.tar.gz deleted file mode 100644 index ae0b1a5..0000000 --- a/fire-0.1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c299d16064ff81cbb649b65988300d4a28b71ecfb789d1fb74d99ea98ae4d2eb -size 33274 diff --git a/fire-0.2.0.tar.gz b/fire-0.2.0.tar.gz new file mode 100644 index 0000000..f079599 --- /dev/null +++ b/fire-0.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdae28ea728d6cad487c900d534426d2cd09ddd2993287a885ff7c8accb097c8 +size 76135 diff --git a/fix-issue-164.patch b/fix-issue-164.patch deleted file mode 100644 index e176d7d..0000000 --- a/fix-issue-164.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2cc070bb50577ec45fae640b56e02c69feb6f82c Mon Sep 17 00:00:00 2001 -From: Andrew Au -Date: Fri, 22 Feb 2019 16:23:03 -0800 -Subject: [PATCH] Fix issue 164 - ---- - fire/helputils_test.py | 1 - - fire/inspectutils.py | 10 ++++++---- - fire/inspectutils_test.py | 2 -- - 3 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/fire/helputils_test.py b/fire/helputils_test.py -index 0557122..c3d5055 100644 ---- a/fire/helputils_test.py -+++ b/fire/helputils_test.py -@@ -88,7 +88,6 @@ def testHelpStringBuiltin(self): - helpstring = helputils.HelpString('test'.upper) - self.assertIn('Type: builtin_function_or_method', helpstring) - self.assertIn('String form: diff --git a/python-fire.spec b/python-fire.spec index b8afac3..a539e5a 100644 --- a/python-fire.spec +++ b/python-fire.spec @@ -18,18 +18,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-fire -Version: 0.1.3 +Version: 0.2.0 Release: 0 Summary: A library for automatically generating command line interfaces License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/google/python-fire Source: https://files.pythonhosted.org/packages/source/f/fire/fire-%{version}.tar.gz -Patch0: fix-issue-164.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six +Requires: python-termcolor BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Levenshtein} @@ -37,6 +37,7 @@ BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} +BuildRequires: %{python_module termcolor} # /SECTION %python_subpackages @@ -46,7 +47,6 @@ interfaces (CLIs) from a Python object. %prep %setup -q -n fire-%{version} -%autopatch -p1 %build %python_build @@ -56,7 +56,7 @@ interfaces (CLIs) from a Python object. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand pytest-%{$python_bin_suffix} -v fire +%pytest %files %{python_files} %license LICENSE