public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-hupper] rawhide: Fix build with pytest-cov 7.x (Fedora#2433885)
@ 2026-06-08 17:11 Mattia Verga
  0 siblings, 0 replies; only message in thread
From: Mattia Verga @ 2026-06-08 17:11 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-hupper
Branch : rawhide
Commit : 90cd3f3207ba05c40076ca14747c4e44991d9f16
Author : Mattia Verga <mattia.verga@proton.me>
Date   : 2026-06-08T19:09:39+02:00
Stats  : +23/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-hupper/c/90cd3f3207ba05c40076ca14747c4e44991d9f16?branch=rawhide

Log:
Fix build with pytest-cov 7.x (Fedora#2433885)

---
diff --git a/python-hupper.spec b/python-hupper.spec
index e290b30..4cc639d 100644
--- a/python-hupper.spec
+++ b/python-hupper.spec
@@ -10,8 +10,12 @@ License:        MIT
 URL:            https://pypi.python.org/pypi/%{srcname}
 Source0:        https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz
 
+# pytest_cov.embed removed from pytest-cov 7.x
+Patch:          remove_call_to_pytest_cov_embed.patch
+
 BuildArch:      noarch
 BuildRequires:  python3-devel
+BuildRequires:  python3dist(pytest-cov)
 
 %description
 hupper is an integrated process monitor that will track changes
@@ -27,7 +31,8 @@ to any imported Python files in sys.modules as well as custom paths.
 When files are changed the process is restarted.
 
 %prep
-%autosetup -n %{srcname}-%{version}
+%autosetup -p1 -n %{srcname}-%{version}
+%pyproject_patch_dependency mock:ignore
 
 %generate_buildrequires
 %pyproject_buildrequires -t

diff --git a/remove_call_to_pytest_cov_embed.patch b/remove_call_to_pytest_cov_embed.patch
new file mode 100644
index 0000000..7043af7
--- /dev/null
+++ b/remove_call_to_pytest_cov_embed.patch
@@ -0,0 +1,17 @@
+diff -U 3 -dHrN a/tests/myapp/__init__.py b/tests/myapp/__init__.py
+--- a/tests/myapp/__init__.py	2019-02-17 00:27:55.000000000 +0100
++++ b/tests/myapp/__init__.py	2026-06-08 19:06:03.890202303 +0200
+@@ -1,11 +1,11 @@
+-import pytest_cov.embed
++#import pytest_cov.embed
+ import signal
+ import sys
+ 
+ 
+ def cleanup(*args, **kwargs):  # pragma: no cover
+     # see https://github.com/pytest-dev/pytest-cov/issues/139
+-    pytest_cov.embed.cleanup()
++    #pytest_cov.embed.cleanup()
+     sys.exit(1)
+ 
+ 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-08 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-08 17:11 [rpms/python-hupper] rawhide: Fix build with pytest-cov 7.x (Fedora#2433885) Mattia Verga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox