Accepting request 1195987 from devel:languages:python
- 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. OBS-URL: https://build.opensuse.org/request/show/1195987 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-glob2?expand=0&rev=4
This commit is contained in:
commit
843cb9b086
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 26 04:01:40 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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 <info@paolostivanin.com>
|
||||
|
||||
|
@ -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
|
||||
|
35
support-pytest-8.patch
Normal file
35
support-pytest-8.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 1baed290ebcaf8356822157a7f7df7c0c94ad1d4 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user