Compare commits

..

No commits in common. 'epel9' and 'i8' have entirely different histories.
epel9 ... i8

22
.gitignore vendored

@ -1,21 +1 @@
/click-1.1.tar.gz
/click-1.1-tests.tgz
/click-2.0.tar.gz
/click-2.0-tests.tgz
/click-2.2.tar.gz
/click-2.4.tar.gz
/click-3.1.tar.gz
/click-3.2.tar.gz
/click-3.3.tar.gz
/click-4.0.tar.gz
/click-4.1.tar.gz
/click-5.1.tar.gz
/click-6.2.tar.gz
/click-6.3.tar.gz
/click-6.6.tar.gz
/click-6.7.tar.gz
/click-7.0.tar.gz
/click-7.1.1.tar.gz
/click-7.1.2.tar.gz
/click-8.0.1.tar.gz
/click-8.0.3.tar.gz
SOURCES/click-6.7.tar.gz

@ -0,0 +1 @@
83c030efae049b4dd834b01780126f0493192eee SOURCES/click-6.7.tar.gz

@ -0,0 +1,24 @@
From 4fa671b4afdde8e103a03b39dcdc66e1a10a16fa Mon Sep 17 00:00:00 2001
From: Adam Dangoor <adamdangoor@gmail.com>
Date: Mon, 31 Jul 2017 17:58:41 +0100
Subject: [PATCH 1/3] Remove outdated comment about Click 3.0
---
click/core.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/click/core.py b/click/core.py
index 7456451..18fa9a5 100644
--- a/click/core.py
+++ b/click/core.py
@@ -68,7 +68,6 @@ def invoke_param_callback(callback, ctx, param, value):
args = getattr(code, 'co_argcount', 3)
if args < 3:
- # This will become a warning in Click 3.0:
from warnings import warn
warn(Warning('Invoked legacy parameter callback "%s". The new '
'signature for such callbacks starting with '
--
2.14.2

@ -0,0 +1,21 @@
From 6e7951c511b8316a73d9a8d9c4cc130becd99e93 Mon Sep 17 00:00:00 2001
From: Adam Dangoor <adamdangoor@gmail.com>
Date: Mon, 31 Jul 2017 18:06:20 +0100
Subject: [PATCH 2/3] Add pytest option to not capture warnings
---
pytest.ini | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 pytest.ini
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..1ceab94
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,2 @@
+[pytest]
+addopts = -p no:warnings
--
2.14.2

@ -0,0 +1,54 @@
From e6fb0fe8bc75e7931fe86e95442eec09b49caee7 Mon Sep 17 00:00:00 2001
From: Adam Dangoor <adamdangoor@gmail.com>
Date: Mon, 31 Jul 2017 19:45:24 +0100
Subject: [PATCH 3/3] Catch and test pytest warning
---
pytest.ini | 2 --
tests/test_compat.py | 15 +++++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
delete mode 100644 pytest.ini
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index 1ceab94..0000000
--- a/pytest.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[pytest]
-addopts = -p no:warnings
diff --git a/tests/test_compat.py b/tests/test_compat.py
index e4ecdc8..d86110a 100644
--- a/tests/test_compat.py
+++ b/tests/test_compat.py
@@ -1,3 +1,5 @@
+import pytest
+
import click
@@ -11,10 +13,19 @@ if click.__version__ >= '3.0':
def cli(foo):
click.echo(foo)
- result = runner.invoke(cli, ['--foo', 'wat'])
+ with pytest.warns(Warning) as records:
+ result = runner.invoke(cli, ['--foo', 'wat'])
+
+ [warning_record] = records
+ warning_message = str(warning_record.message)
+ assert 'Invoked legacy parameter callback' in warning_message
assert result.exit_code == 0
+ # Depending on the pytest version, the warning message may be
+ # in `result.output`.
+ #
+ # In pytest version 3.1 pytest started capturing warnings by default.
+ # See https://docs.pytest.org/en/latest/warnings.html#warnings-capture.
assert 'WAT' in result.output
- assert 'Invoked legacy parameter callback' in result.output
def test_bash_func_name():
--
2.14.2

@ -1,13 +1,26 @@
%global pypi_name click
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-%{pypi_name}
Version: 8.0.3
Release: 1%{?dist}
Version: 6.7
Release: 8%{?dist}.inferit
Summary: Simple wrapper around optparse for powerful command line utilities
License: BSD
URL: https://github.com/mitsuhiko/click
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
# https://bugzilla.redhat.com/show_bug.cgi?id=1500962
# https://github.com/pallets/click/pull/838
Patch0: 0001-Remove-outdated-comment-about-Click-3.0.patch
Patch1: 0002-Add-pytest-option-to-not-capture-warnings.patch
Patch2: 0003-Catch-and-test-pytest-warning.patch
BuildArch: noarch
%global _description \
@ -18,100 +31,85 @@ comes with good defaults out of the box.
%description %{_description}
%package -n python%{python3_pkgversion}-%{pypi_name}
%if %{with python2}
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
%if ! (0%{?rhel} && 0%{?rhel} <= 7)
BuildRequires: python2-setuptools
# pytest in base RHEL is too old, we'll skip the tests there
BuildRequires: python2-pytest >= 2.8
%else
BuildRequires: python-setuptools
%endif
%description -n python2-%{pypi_name} %{_description}
Python 2 version.
%endif # with python2
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-pytest >= 2.8
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
Python 3 version.
%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Use test dependencies without version locks
sed -i 's|requirements/tests.txt|requirements/tests.in|' tox.ini
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%if %{with python2}
%py2_build
%endif # with python2
%py3_build
%install
%pyproject_install
%pyproject_save_files %{pypi_name}
%if %{with python2}
%py2_install
%endif # with python2
%py3_install
%check
%tox
%files -n python%{python3_pkgversion}-%{pypi_name} -f %pyproject_files
%license LICENSE.rst
%doc README.rst CHANGES.rst
export PYTHONPATH=$(pwd)
%if %{with python2}
%if ! (0%{?rhel} && 0%{?rhel} <= 7)
# pytest in base RHEL is too old, we'll skip the tests there
py.test-%{python2_version} tests --tb=long --verbose
%endif
%endif # with python2
py.test-%{python3_version} tests --tb=long --verbose
%if %{with python2}
%files -n python2-%{pypi_name}
%license LICENSE
%doc README CHANGES
%{python2_sitelib}/%{pypi_name}-*.egg-info/
%{python2_sitelib}/%{pypi_name}/
%endif # with python2
%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE
%doc README CHANGES
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%{python3_sitelib}/%{pypi_name}/
%changelog
* Fri Nov 05 2021 Karolina Surma <ksurma@redhat.com> - 8.0.3-1
- Update to 8.0.3
Resolves: rhbz#2012353
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jul 08 2021 Lumír Balhar <lbalhar@redhat.com> - 8.0.1-2
- Use test dependencies without version locks
* Tue Jun 22 2021 Lumír Balhar <lbalhar@redhat.com> - 8.0.1-1
- Update to 8.0.1
Resolves: rhbz#1901659
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 7.1.2-6
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Sep 11 2020 Charalampos Stratakis <cstratak@redhat.com> - 7.1.2-4
- Modernize the SPEC and convert it to pyproject macros
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 7.1.2-2
- Rebuilt for Python 3.9
* Tue Apr 28 2020 Fabian Affolter <mail@fabian-affolter.ch> - 7.1.2-1
- Update to latest upstream release 7.1.2 (rhbz#1828589)
* Sat Apr 18 2020 Fabian Affolter <mail@fabian-affolter.ch> - 7.1.1-1
- Update to latest upstream release 7.1.1 (rhbz#1811727)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Sep 18 2019 Miro Hrončok <mhroncok@redhat.com> - 7.0-6
- Subpackage python2-click has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 7.0-5
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 7.0-2
- Drop explicit locale setting
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
* Tue Oct 02 2018 Charalampos Stratakis <cstratak@redhat.com> - 7.0-1
- Update to 7.0
* Mon Sep 11 2023 Sergey Cherevko <s.cherevko@msvsphere.ru> - 6.7-8.inferit
- Udapted spec for build
- Rebuilt for MSVSphere 8.8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 6.7-8
- Rebuilt for MSVSphere 8.8
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 6.7-8
- Rebuilt for Python 3.7
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 6.7-8
- Conditionalize the python2 subpackage
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

@ -1 +0,0 @@
SHA512 (click-8.0.3.tar.gz) = 73d29b73d5f90132282753fa1b53f42a690ebf713e8e4f2e3ff3c8820ef71ed82c5165bf61563341170a263c4202adb5690540fdeb6501fb9d81d2db06a5e89e
Loading…
Cancel
Save