diff --git a/python-glob2.changes b/python-glob2.changes index 37fe304..04aa888 100644 --- a/python-glob2.changes +++ b/python-glob2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Aug 26 04:01:40 UTC 2024 - Steve Kowalik + +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. +- Add patch support-pytest-8.patch: + * Use correct setup/teardown methods for Pytest 8. + ------------------------------------------------------------------- Thu Mar 26 13:54:35 UTC 2020 - Paolo Stivanin diff --git a/python-glob2.spec b/python-glob2.spec index cb925e4..1d345f3 100644 --- a/python-glob2.spec +++ b/python-glob2.spec @@ -1,7 +1,7 @@ # # spec file for package python-glob2 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-glob2 Version: 0.7 Release: 0 Summary: Glob module recursive wildcards support License: BSD-2-Clause -Group: Development/Languages/Python URL: https://pypi.python.org/pypi/glob2 Source: https://files.pythonhosted.org/packages/source/g/glob2/glob2-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#miracle2k/python-glob2#31 +Patch0: support-pytest-8.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -45,13 +47,13 @@ module with the following additions: glob on virtual filesystems. %prep -%setup -q -n glob2-%{version} +%autosetup -p1 -n glob2-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -60,6 +62,7 @@ module with the following additions: %files %{python_files} %license LICENSE %doc README.rst CHANGES -%{python_sitelib}/* +%{python_sitelib}/glob2 +%{python_sitelib}/glob2-%{version}.dist-info %changelog diff --git a/support-pytest-8.patch b/support-pytest-8.patch new file mode 100644 index 0000000..587cd7c --- /dev/null +++ b/support-pytest-8.patch @@ -0,0 +1,35 @@ +From 1baed290ebcaf8356822157a7f7df7c0c94ad1d4 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Mon, 26 Aug 2024 13:58:53 +1000 +Subject: [PATCH] Support pytest 8 + +Pytest 8 removes support for deprecated nose setup and teardown methods, +add _method to fix that. + +Fixes #30 +--- + test.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test.py b/test.py +index c709ee3..5ef9aad 100644 +--- a/test.py ++++ b/test.py +@@ -46,7 +46,7 @@ def test_sequence(self): + + class BaseTest(object): + +- def setup(self): ++ def setup_method(self): + self.basedir = tempfile.mkdtemp() + self._old_cwd = os.getcwd() + os.chdir(self.basedir) +@@ -56,7 +56,7 @@ def setup(self): + def setup_files(self): + pass + +- def teardown(self): ++ def teardown_method(self): + os.chdir(self._old_cwd) + shutil.rmtree(self.basedir) +