12
0
forked from pool/python-apipkg

- Add patch support-pytest-9.patch

* Fix function defintion as per pytest 9.
- Correct BuildRequires to match reality.
This commit is contained in:
2025-11-26 14:59:02 +11:00
parent df6d7f4768
commit 96bb93e28f
3 changed files with 40 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Nov 26 03:58:45 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-9.patch:
* Fix function defintion as per pytest 9.
- Correct BuildRequires to match reality.
-------------------------------------------------------------------
Mon Oct 2 10:03:48 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -30,18 +30,19 @@ Version: 3.0.2
Release: 0
Summary: Namespace control and lazy-import mechanism
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/apipkg/
Source: https://github.com/pytest-dev/apipkg/archive/refs/tags/v%{version}.tar.gz#/apipkg-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/pytest-dev/apipkg/pull/58
Patch0: support-pytest-9.patch
%if %{with test}
BuildRequires: %{python_module apipkg = %{version}}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest >= 7}
# Assumes setuptools is installed, Python 3.12+
BuildRequires: %{python_module setuptools}
%endif
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -90,7 +91,7 @@ EOF
%license LICENSE
%doc README.rst
%{python_sitelib}/apipkg
%{python_sitelib}/apipkg-%{version}*-info
%{python_sitelib}/apipkg-%{version}.dist-info
%endif
%changelog

26
support-pytest-9.patch Normal file
View File

@@ -0,0 +1,26 @@
From dd5a5b755003989746139e847bf3eeaee91f1bb3 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 26 Nov 2025 14:48:43 +1100
Subject: [PATCH] Support pytest 9
Change the function specification of pytest_report_header to match what
pytest 9 expects.
Closes #55
---
conftest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conftest.py b/conftest.py
index 795c06b..3b70f03 100644
--- a/conftest.py
+++ b/conftest.py
@@ -6,7 +6,7 @@
INSTALL_TYPE = "editable" if apipkg.__file__ == LOCAL_APIPKG else "full"
-def pytest_report_header(startdir):
+def pytest_report_header(start_path):
return "apipkg {install_type} install version={version}".format(
install_type=INSTALL_TYPE, version=apipkg.__version__
)