From 589bc88ae84dd0b74532f7cd76df1935b9d66f302cb97e5edfb0a8faa1657950 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 15 May 2025 05:16:22 +0000 Subject: [PATCH] - Promote pytest to Requires. - Add patch support-click-8.2.patch: * click 8.2.0 now exits non-zero when printing help. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requre?expand=0&rev=16 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + python-requre.changes | 76 ++++++++++++++++++++++++++++++++++ python-requre.spec | 91 +++++++++++++++++++++++++++++++++++++++++ requre-0.8.4.tar.gz | 3 ++ requre-0.9.0.tar.gz | 3 ++ requre-0.9.1.tar.gz | 3 ++ support-click-8.2.patch | 13 ++++++ 8 files changed, 213 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-requre.changes create mode 100644 python-requre.spec create mode 100644 requre-0.8.4.tar.gz create mode 100644 requre-0.9.0.tar.gz create mode 100644 requre-0.9.1.tar.gz create mode 100644 support-click-8.2.patch 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-requre.changes b/python-requre.changes new file mode 100644 index 0000000..6a669d5 --- /dev/null +++ b/python-requre.changes @@ -0,0 +1,76 @@ +------------------------------------------------------------------- +Thu May 15 05:16:09 UTC 2025 - Steve Kowalik + +- Promote pytest to Requires. +- Add patch support-click-8.2.patch: + * click 8.2.0 now exits non-zero when printing help. + +------------------------------------------------------------------- +Sat Mar 29 09:43:12 UTC 2025 - Dirk Müller + +- update to 0.9.1: + * Adjusted `requre-purge` to not replace GitHub tokens with + dummy token that still looks like a legit one and also + case-sensitiveness on the cookies from Pagure. + +------------------------------------------------------------------- +Wed Mar 19 10:57:19 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 0.9.0 + * Supports recording of the requests done by `httpx` via + `record_httpx()` and `recording_httpx()` decorators. (#297) +- from version 0.8.6 + * Trigger a new release to fix the PyPI upload action. +- from version 0.8.5 + * Trigger a new release to confirm the correct SPDX licence. +- Update BuildRequires and Requires from pyproject.toml + +------------------------------------------------------------------- +Mon Feb 26 16:32:40 UTC 2024 - Dirk Müller + +- restrict to new python stack in sle15 + +------------------------------------------------------------------- +Mon Feb 26 12:27:18 UTC 2024 - Dirk Müller + +- update to 0.8.4: + * Provide `__version__` of the package so it can be easily + checked when installed on the system. + * Fix an issue of clashing with the _coverage_. + * Packaging has been modernized. + +------------------------------------------------------------------- +Mon Jul 17 07:00:01 UTC 2023 - Steve Kowalik + +- Remove BuildRequires on setuptools_scm_git_archive. +- Switch to pyproject macros. +- Add missing Requires on update-alternatives. +- Stop using greedy globs in %files. + +------------------------------------------------------------------- +Mon Jun 20 06:04:36 UTC 2022 - Steve Kowalik + +- Update to 0.8.2: + * default decorator if not given + * guess output decorator class + * class shortcut decorators + * python tuple support as base type + * Fix a performance issue when detecting cassettes following the old + naming format. + * New decorators for handling temporary files (MkTemp) and directories + (MkDTemp) in a more transparent way. The old implementation based on + static paths and counter has been deprecated. + * Fix the problem with kwarg decorators that causes the function body + not to be executed. +- Change skipped tests expression due to reorganization. +- Add GitPython to {Build,}Requires + +------------------------------------------------------------------- +Wed Nov 18 00:26:30 UTC 2020 - John Vandenberg + +- Update to v0.4.0 + +------------------------------------------------------------------- +Mon Mar 9 09:32:59 AM UTC 2020 - John Vandenberg + +- Initial spec for v0.2.4 diff --git a/python-requre.spec b/python-requre.spec new file mode 100644 index 0000000..f65068e --- /dev/null +++ b/python-requre.spec @@ -0,0 +1,91 @@ +# +# spec file for package python-requre +# +# 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 +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-requre +Version: 0.9.1 +Release: 0 +Summary: Python libray for storing and using objects for testing +License: MIT +URL: https://github.com/packit-service/requre +Source: https://files.pythonhosted.org/packages/source/r/requre/requre-%{version}.tar.gz +# PATCH-FIX-OPENSUSE click 8.2.0 now exits non-zero when printing help +Patch0: support-click-8.2.patch +BuildRequires: %{python_module hatch_vcs} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-GitPython +Requires: python-PyYAML +Requires: python-click +Requires: python-httpx +Requires: python-pytest +Requires: python-requests +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module GitPython} +BuildRequires: %{python_module click} +BuildRequires: %{python_module httpx} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +# /SECTION +%python_subpackages + +%description +Library for testing python code what allows store output of +various objects and use stored data for testing. + +%prep +%autosetup -p1 -n requre-%{version} +# Remove cyclic dependency with ogr +rm tests/test_E2E_ogr.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/requre-patch +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%post +%python_install_alternative requre-patch + +%postun +%python_uninstall_alternative requre-patch + +%check +export LANG=en_US.UTF-8 +# needs network: test_record_requests, test_online_replacing, StoreAnyRequest +# and TestWrite +# test_a and InstalledCommand fail +# Latency fails randomly on OBS slaves +%pytest -rs -k 'not (test_record_requests or test_online_replacing or StoreAnyRequest or TestWrite or (StoreFunctionOutput and test_a) or InstalledCommand or Latency)' + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/requre-patch +%{python_sitelib}/requre +%{python_sitelib}/requre-%{version}.dist-info + +%changelog diff --git a/requre-0.8.4.tar.gz b/requre-0.8.4.tar.gz new file mode 100644 index 0000000..186455d --- /dev/null +++ b/requre-0.8.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a42f41f09450e1b10915e0adb9edd919d94137f4cfbf23b400ddffa3591930d +size 226513 diff --git a/requre-0.9.0.tar.gz b/requre-0.9.0.tar.gz new file mode 100644 index 0000000..9663938 --- /dev/null +++ b/requre-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91caf2571eaed9f59d36df1803c917792be19dac3c2492285af20be5f3fd7ff6 +size 230396 diff --git a/requre-0.9.1.tar.gz b/requre-0.9.1.tar.gz new file mode 100644 index 0000000..24051f7 --- /dev/null +++ b/requre-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c3064c1ca3795730d63a5640944e1241b1f29752eaa7edcb803dba9fe5e85cc +size 230487 diff --git a/support-click-8.2.patch b/support-click-8.2.patch new file mode 100644 index 0000000..e80f566 --- /dev/null +++ b/support-click-8.2.patch @@ -0,0 +1,13 @@ +Index: requre-0.9.1/tests/test_e2e_test_patching.py +=================================================================== +--- requre-0.9.1.orig/tests/test_e2e_test_patching.py ++++ requre-0.9.1/tests/test_e2e_test_patching.py +@@ -82,7 +82,7 @@ class NoApplied(unittest.TestCase): + run_command(cmd=f"{CMD_RELATIVE} clean", fail=False) + + def test_help(self): +- run_command(cmd=f"{CMD_RELATIVE}") ++ run_command(cmd=f"{CMD_RELATIVE}", fail=False) + + def test_bad_command(self): + self.assertRaises(