diff --git a/python-fire.changes b/python-fire.changes index 9b2cdcf..c150fb4 100644 --- a/python-fire.changes +++ b/python-fire.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 15 03:36:44 UTC 2019 - Steve Kowalik + +- Add subpoint-usage-test.patch, which will change the subpoint usage string + if running under Python 3.8. + ------------------------------------------------------------------- Fri Sep 13 07:44:29 UTC 2019 - Tomáš Chvátal diff --git a/python-fire.spec b/python-fire.spec index 9ee2c77..8f73410 100644 --- a/python-fire.spec +++ b/python-fire.spec @@ -25,6 +25,7 @@ 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: subpoint-usage-test.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -47,6 +48,7 @@ interfaces (CLIs) from a Python object. %prep %setup -q -n fire-%{version} +%autopatch -p1 %build %python_build diff --git a/subpoint-usage-test.patch b/subpoint-usage-test.patch new file mode 100644 index 0000000..4c09dbd --- /dev/null +++ b/subpoint-usage-test.patch @@ -0,0 +1,19 @@ +--- fire-0.2.1/fire/helptext_test.py~ 2019-10-15 12:58:44.707467291 +1100 ++++ fire-0.2.1/fire/helptext_test.py 2019-10-15 13:00:24.971635944 +1100 +@@ -20,6 +20,7 @@ + + import os + import textwrap ++import sys + + from fire import formatting + from fire import helptext +@@ -430,6 +431,8 @@ + t = trace.FireTrace(component, name='SubPoint') + usage_output = helptext.UsageText(component, trace=t, verbose=False) + expected_output = 'Usage: SubPoint --x=X --y=Y' ++ if sys.hexversion > 0x03080000: ++ expected_output = 'Usage: SubPoint | --x=X --y=Y' + self.assertIn(expected_output, usage_output) + + if __name__ == '__main__':