Compare commits

6 Commits

Author SHA256 Message Date
0db5e738d6 Accepting request 1286221 from devel:languages:python
- Switch to pyproject macros.
- Ship README as a doc.

OBS-URL: https://build.opensuse.org/request/show/1286221
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fire?expand=0&rev=14
2025-06-17 16:22:45 +00:00
4eac8582d9 - Switch to pyproject macros.
- Ship README as a doc.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=29
2025-06-17 04:19:16 +00:00
8dca5179d7 Accepting request 1223452 from devel:languages:python
Very much alive and perhaps useful.

OBS-URL: https://build.opensuse.org/request/show/1223452
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fire?expand=0&rev=13
2024-11-12 18:21:45 +00:00
bdc123da6b - support-python-311.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=27
2024-11-12 00:32:43 +00:00
152c0ff7a1 - Replace upstreamed patch:
- python-fire-no-mock.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=26
2024-11-12 00:31:48 +00:00
94bdf8ea17 Accepting request 1219876 from home:pgajdos
- version update to 0.7.0
  * This release is the first to drop Python 2 support. For Python 2 users, use <= 0.6.0.
  * CI improvements from @Borda including dependabot and an expanded build matrix
  * adding GH dependabot by @Borda in #432
  * Bump the pip group with 2 updates by @dependabot in #491
  * Update hypothesis requirement from <6.62.0 to <6.100.0 in /.github/scripts by @dependabot in #492
  * #444: Removed pipes dependency by @BasedDepartment1 in #447
  * Update termcolor requirement from <2.2.0 to <2.5.0 in /.github/scripts by @dependabot in #493
  * Update mock requirement from <5.0.0 to <6.0.0 in /.github/scripts by @dependabot in #495
  * Update pytest requirement from <=7.2.1 to <=8.1.1 in /.github/scripts by @dependabot in #494
  * Update pytest-runner requirement from <6.0.0 to <7.0.0 in /.github/scripts by @dependabot in #496
  * fix typo in dependabot group by @Borda in #497
  * Update setuptools requirement from <=69.1.1 to <=69.2.0 in /.github/scripts by @dependabot in #500
  * Update hypothesis requirement from <6.100.0 to <6.101.0 in /.github/scripts by @dependabot in #506
  * Update levenshtein requirement from <=0.25.0 to <=0.25.1 in /.github/scripts by @dependabot in #510
  * Use ast.Constant for recent Python versions by @wdhongtw in #526
  * Remove future imports now that we've dropped support for Python 2 by @dbieber in #539
  * remove six: Replace six.string_types and six.integer_types, etc. by @dbieber in #541
  * Remove sys.version_info checks by @dbieber in #542
  * Update setuptools requirement from <=69.2.0 to <=75.1.0 in /.github/scripts by @dependabot in #540
  * Simplify requirements.txt by assuming Python 3 by @dbieber in #543
  * Update hypothesis requirement from <6.101.0 to <6.113.0 in /.github/scripts by @dependabot in #544
  * Remove mock in favor of unittest.mock by @dbieber in #545
  * Update pytest requirement from <=8.1.1 to <=8.3.3 in /.github/scripts by @dependabot in #546
  * Update label used by dependabot by @dbieber in #547
  * Update levenshtein requirement from <=0.25.1 to <=0.26.0 in /.github/scripts by @dependabot in #548
  * Upgrade pylint version by @dbieber in #549
  * Run github action on pull_request by @dbieber in #550
  * Add current system MSYS check by @bonfy in #278
  * Remove .format in favor of f-strings by @dbieber in #551

OBS-URL: https://build.opensuse.org/request/show/1219876
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=25
2024-11-01 05:38:02 +00:00
6 changed files with 63 additions and 108 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6
size 88282

3
fire-0.7.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:961550f07936eaf65ad1dc8360f2b2bf8408fad46abbfa4d2a3794f8d2a95cdf
size 87189

View File

@@ -1,81 +0,0 @@
Index: fire-0.5.0/fire/core_test.py
===================================================================
--- 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
from fire import trace
-import mock
+
+try:
+ import mock # python 2.x
+except ModuleNotFoundError:
+ from unittest import mock # python 3.x
import six
Index: fire-0.5.0/fire/fire_import_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.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
-import mock
+try:
+ import mock # python 2.x
+except ModuleNotFoundError:
+ from unittest import mock # python 3.x
import six
Index: fire-0.5.0/fire/interact_test.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.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
-import mock
+try:
+ import mock # python 2.x
+except ModuleNotFoundError:
+ from unittest import mock # python 3.x
import six

View File

@@ -1,3 +1,54 @@
-------------------------------------------------------------------
Tue Jun 17 04:14:19 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- Ship README as a doc.
-------------------------------------------------------------------
Thu Oct 31 14:31:28 UTC 2024 - pgajdos@suse.com
- version update to 0.7.0
* This release is the first to drop Python 2 support. For Python 2 users, use <= 0.6.0.
* CI improvements from @Borda including dependabot and an expanded build matrix
* adding GH dependabot by @Borda in #432
* Bump the pip group with 2 updates by @dependabot in #491
* Update hypothesis requirement from <6.62.0 to <6.100.0 in /.github/scripts by @dependabot in #492
* #444: Removed pipes dependency by @BasedDepartment1 in #447
* Update termcolor requirement from <2.2.0 to <2.5.0 in /.github/scripts by @dependabot in #493
* Update mock requirement from <5.0.0 to <6.0.0 in /.github/scripts by @dependabot in #495
* Update pytest requirement from <=7.2.1 to <=8.1.1 in /.github/scripts by @dependabot in #494
* Update pytest-runner requirement from <6.0.0 to <7.0.0 in /.github/scripts by @dependabot in #496
* fix typo in dependabot group by @Borda in #497
* Update setuptools requirement from <=69.1.1 to <=69.2.0 in /.github/scripts by @dependabot in #500
* Update hypothesis requirement from <6.100.0 to <6.101.0 in /.github/scripts by @dependabot in #506
* Update levenshtein requirement from <=0.25.0 to <=0.25.1 in /.github/scripts by @dependabot in #510
* Use ast.Constant for recent Python versions by @wdhongtw in #526
* Remove future imports now that we've dropped support for Python 2 by @dbieber in #539
* remove six: Replace six.string_types and six.integer_types, etc. by @dbieber in #541
* Remove sys.version_info checks by @dbieber in #542
* Update setuptools requirement from <=69.2.0 to <=75.1.0 in /.github/scripts by @dependabot in #540
* Simplify requirements.txt by assuming Python 3 by @dbieber in #543
* Update hypothesis requirement from <6.101.0 to <6.113.0 in /.github/scripts by @dependabot in #544
* Remove mock in favor of unittest.mock by @dbieber in #545
* Update pytest requirement from <=8.1.1 to <=8.3.3 in /.github/scripts by @dependabot in #546
* Update label used by dependabot by @dbieber in #547
* Update levenshtein requirement from <=0.25.1 to <=0.26.0 in /.github/scripts by @dependabot in #548
* Upgrade pylint version by @dbieber in #549
* Run github action on pull_request by @dbieber in #550
* Add current system MSYS check by @bonfy in #278
* Remove .format in favor of f-strings by @dbieber in #551
* Remove six from console, eliminates six entirely by @dbieber in #552
* Move asyncio imports and update docs by @dbieber in #553
* Include Python 3.13 in github actions by @dbieber in #554
* Continue upgrade of codebase to Python 3 by @dbieber in #556
* update required Python 3.7 in setup.py by @Borda in #555
* Lint improvements and type safety by @dbieber in #558
* ci: expand build matrix for major OS by @Borda in #490
* Replace Python 2 type hints with real type annotations by @dbieber in #559
- Replace upstreamed patch:
- python-fire-no-mock.patch
- support-python-311.patch
-------------------------------------------------------------------
Tue Feb 7 01:05:45 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-fire
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,28 +16,25 @@
#
%define skip_python2 1
Name: python-fire
Version: 0.5.0
Version: 0.7.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
# 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: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six
Requires: python-termcolor
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Levenshtein}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
BuildRequires: %{python_module termcolor}
# /SECTION
%python_subpackages
@@ -50,17 +47,19 @@ interfaces (CLIs) from a Python object.
%autosetup -p1 -n fire-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/fire
%{python_sitelib}/fire-%{version}.dist-info
%changelog

View File

@@ -1,14 +0,0 @@
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