diff --git a/python-apipkg.changes b/python-apipkg.changes index 338c7a2..3f76581 100644 --- a/python-apipkg.changes +++ b/python-apipkg.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 26 03:58:45 UTC 2025 - Steve Kowalik + +- 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 diff --git a/python-apipkg.spec b/python-apipkg.spec index 8918380..e36e152 100644 --- a/python-apipkg.spec +++ b/python-apipkg.spec @@ -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 diff --git a/support-pytest-9.patch b/support-pytest-9.patch new file mode 100644 index 0000000..5cd3ceb --- /dev/null +++ b/support-pytest-9.patch @@ -0,0 +1,26 @@ +From dd5a5b755003989746139e847bf3eeaee91f1bb3 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +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__ + )