commit b1cde8676ab043d90ed010f567e66ec47b082f4b094b8a5eb6575aefbbcf8b50 Author: Sebastian Wagner Date: Mon Sep 8 20:44:36 2025 +0000 - Update to version 1.1.1.2: * Add a clear note stating that the package is no longer maintained, but the library can be vendored. - Update to version 1.1.1.1: * Mark the project as inactive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-click-plugins?expand=0&rev=21 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-click-plugins-1.1.1.2.tar.gz b/python-click-plugins-1.1.1.2.tar.gz new file mode 100644 index 0000000..0c12c99 --- /dev/null +++ b/python-click-plugins-1.1.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcc7f70fda1e73121b23e248d8f7a16d7bfdc60838b1ee200836cde9929b75ed +size 10097 diff --git a/python-click-plugins.changes b/python-click-plugins.changes new file mode 100644 index 0000000..c1bc7f7 --- /dev/null +++ b/python-click-plugins.changes @@ -0,0 +1,69 @@ +------------------------------------------------------------------- +Wed Jun 25 04:43:36 UTC 2025 - Sebastian Wagner + +- Update to version 1.1.1.2: + * Add a clear note stating that the package is no longer maintained, but the library can be vendored. +- Update to version 1.1.1.1: + * Mark the project as inactive. + +------------------------------------------------------------------- +Wed May 14 04:08:19 UTC 2025 - Steve Kowalik + +- Add patch support-click-8.2.patch: + * Support click 8.2+ changes. +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Sun Jun 11 13:45:26 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Sun May 2 07:53:42 UTC 2021 - Sebastian Wagner + +- deactivate python2 builds for SLE 15 SP3. + +------------------------------------------------------------------- +Sun Jan 24 19:45:42 UTC 2021 - Sebastian Wagner + +- deactivate python2 builds for Leap 15.3. + +------------------------------------------------------------------- +Thu Aug 20 23:38:47 UTC 2020 - John Vandenberg + +- Remove %bcond_without test, activating tests +- Add fdupes and tidy spec + +------------------------------------------------------------------- +Sun Apr 7 19:43:09 UTC 2019 - Sebastian Wagner + +- update to version 1.1.1: + - Fixed a version mismatch in `click_plugins/__init__.py` See `1.1`. +- update to version 1.1: + - Fix an issue where a broken command's traceback would not be emitted - https://github.com/click-contrib/click-plugins/issues/25 + - Bump required click version to `click>=4` - https://github.com/click-contrib/click-plugins/pull/28 + - Runs Travis tests for the latest release of click versions 4 -> 7 - https://github.com/click-contrib/click-plugins/pull/28 + +------------------------------------------------------------------- +Tue Dec 4 12:46:38 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Mon Sep 17 20:00:17 UTC 2018 - Sebastian Wagner + +- update to version 1.0.4: + - Preemptive fix for a breaking change in Click v7. CLI command names generated from functions with underscores will have dashes instead of underscores. See https://github.com/click-contrib/click-plugins/issues/19. + +------------------------------------------------------------------- +Sat Mar 3 18:34:32 UTC 2018 - arun@gmx.de + +- specfile: + * update copyright year + * don't use python_module for Requires + +------------------------------------------------------------------- +Tue Jul 4 15:11:11 UTC 2017 - sebix+novell.com@sebix.at + +- initial package diff --git a/python-click-plugins.spec b/python-click-plugins.spec new file mode 100644 index 0000000..7e2abd5 --- /dev/null +++ b/python-click-plugins.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-click-plugins +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if 0%{?sle_version} == 150300 +# tests fail on python2 on Leap 15.3 and SLE 15 SP3 +%define skip_python2 1 +%endif +%{?sle15_python_module_pythons} +Name: python-click-plugins +Version: 1.1.1.2 +Release: 0 +Summary: Click extension to register CLI commands via setuptools entry-points +License: BSD-3-Clause +URL: https://github.com/click-contrib/click-plugins +Source0: https://github.com/click-contrib/click-plugins/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-OPENSUSE https://github.com/click-contrib/click-plugins/issues/38 +Patch0: support-click-8.2.patch +BuildRequires: %{python_module click >= 3.0} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-click >= 3.0 +BuildArch: noarch +%python_subpackages + +%description +Use a decorator to get setuptools entry points that allows others +to use your commandline utility as a home for their related sub-commands. +You get to choose where these sub-commands or sub-groups can be registered +but the plugin developer gets to choose they ARE registered. +You could have all plugins register alongside the core commands, +in a special sub-group, across multiple sub-groups, or some combination. + +%prep +%autosetup -p1 -n click-plugins-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +%pytest + +%files %{python_files} +%doc AUTHORS.txt CHANGES.md README.rst +%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320 +%%license LICENSE.txt +%else +%license LICENSE.txt +%endif +%{python_sitelib}/click_plugins +%{python_sitelib}/click_plugins-%{version}.dist-info + +%changelog diff --git a/support-click-8.2.patch b/support-click-8.2.patch new file mode 100644 index 0000000..3509754 --- /dev/null +++ b/support-click-8.2.patch @@ -0,0 +1,78 @@ +Index: click-plugins-1.1.1/tests/test_plugins.py +=================================================================== +--- click-plugins-1.1.1.orig/tests/test_plugins.py ++++ click-plugins-1.1.1/tests/test_plugins.py +@@ -1,3 +1,6 @@ ++import importlib.metadata ++ ++from packaging.version import Version + from pkg_resources import EntryPoint + from pkg_resources import iter_entry_points + from pkg_resources import working_set +@@ -20,6 +23,12 @@ def cmd2(arg): + """Test command 2""" + click.echo('passed') + ++click_version = Version(importlib.metadata.version("click")) ++if click_version >= Version("8.2"): ++ expected_exit_code = 2 ++else: ++ expected_exit_code = 0 ++ + + # Manually register plugins in an entry point and put broken plugins in a + # different entry point. +@@ -78,7 +87,7 @@ def test_registered(): + def test_register_and_run(runner): + + result = runner.invoke(good_cli) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + + for ep in iter_entry_points('_test_click_plugins.test_plugins'): + cmd_result = runner.invoke(good_cli, [ep.name, 'something']) +@@ -89,7 +98,7 @@ def test_register_and_run(runner): + def test_broken_register_and_run(runner): + + result = runner.invoke(broken_cli) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + assert u'\U0001F4A9' in result.output or u'\u2020' in result.output + + for ep in iter_entry_points('_test_click_plugins.broken_plugins'): +@@ -108,7 +117,7 @@ def test_group_chain(runner): + pass + + result = runner.invoke(good_cli) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + assert sub_cli.name in result.output + for ep in iter_entry_points('_test_click_plugins.test_plugins'): + assert ep.name in result.output +@@ -121,7 +130,7 @@ def test_group_chain(runner): + pass + + result = runner.invoke(good_cli, ['sub-cli-plugins']) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + for ep in iter_entry_points('_test_click_plugins.test_plugins'): + assert ep.name in result.output + +@@ -142,7 +151,7 @@ def test_exception(): + + def test_broken_register_and_run_with_help(runner): + result = runner.invoke(broken_cli) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + assert u'\U0001F4A9' in result.output or u'\u2020' in result.output + + for ep in iter_entry_points('_test_click_plugins.broken_plugins'): +@@ -153,7 +162,7 @@ def test_broken_register_and_run_with_he + + def test_broken_register_and_run_with_args(runner): + result = runner.invoke(broken_cli) +- assert result.exit_code == 0 ++ assert result.exit_code == expected_exit_code + assert u'\U0001F4A9' in result.output or u'\u2020' in result.output + + for ep in iter_entry_points('_test_click_plugins.broken_plugins'):