public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyperclip] epel10.3: Enable running most of the graphical tests
@ 2026-09-21 9:02 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-21 9:02 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pyperclip
Branch : epel10.3
Commit : f1f993cee590999cc9c50ed50a5e0f754f012540
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2022-08-12T13:35:43-04:00
Stats : +50/-5 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-pyperclip/c/f1f993cee590999cc9c50ed50a5e0f754f012540?branch=epel10.3
Log:
Enable running most of the graphical tests
---
diff --git a/python-pyperclip.spec b/python-pyperclip.spec
index 41c2f1b..f5e17b9 100644
--- a/python-pyperclip.spec
+++ b/python-pyperclip.spec
@@ -3,7 +3,7 @@
Name: python-%{pypi_name}
Version: 1.8.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A cross-platform clipboard module for Python
License: BSD
@@ -15,12 +15,48 @@ BuildArch: noarch
Pyperclip is a cross-platform Python module for copy and paste clipboard
functions.
+
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-pytest
+BuildRequires: python3dist(setuptools)
+
+# While upstream runs tests directly with Python/unittest, using pytest as the
+# runner allows us to more easily skip tests.
+BuildRequires: python3dist(pytest)
+
+# Support graphical tests in non-graphical environment
+BuildRequires: xorg-x11-server-Xvfb
+
+# TestGtk (module gtk)
+# (not available; this would be the obsolete PyGTK for GTK2, which never
+# supported Python 3)
+
+# TestQt (module PyQt5.QtWidgets)
+BuildRequires: python3dist(pyqt5)
+
+# TestXClip (executable xclip)
+BuildRequires: /usr/bin/xclip
+
+# TestXSel (executable xsel)
+# These tests *can* pass, but some of them are flaky. It would be nice to
+# figure out why.
+# BuildRequires: /usr/bin/xsel
+
+# TestWlClipboard (executable wl-copy)
+# These would fail with:
+# Failed to connect to a Wayland server
+# error: XDG_RUNTIME_DIR not set in the environment.
+# BuildRequires: /usr/bin/wl-copy
+
+# TestKlipper (executables klipper and qdbus)
+# These would fail with:
+# Could not connect to D-Bus server:
+# org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch
+# terminated abnormally without any error message
+# BuildRequires: /usr/bin/klipper
+# BuildRequires: /usr/bin/qdbus
%description -n python3-%{pypi_name}
Pyperclip is a cross-platform Python module for copy and paste clipboard
@@ -54,18 +90,27 @@ rm -rf html/.{doctrees,buildinfo}
%py3_install
%check
-#%%{__python3} setup.py test
-%pytest
+%global __pytest /usr/bin/xvfb-run -a /usr/bin/pytest
+# Explicitly skip backends that we know will fail in the mock environment if
+# their dependencies happen to be present. See notes in the BuildRequires.
+%pytest -k 'not TestGtk and not TestXSel and not TestWlClipboard and not TestKlipper' -v
%files -n python3-%{pypi_name}
+%license LICENSE.txt
+%doc AUTHORS.txt
+%doc CHANGES.txt
%doc README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%files -n python-%{pypi_name}-doc
+%license LICENSE.txt
%doc html
%changelog
+* Fri Aug 12 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.8.2-2
+- Enable running most of the graphical tests
+
* Mon Aug 08 2022 Jonathan Wright <jonathan@almalinux.org> - 1.8.2-1
- Update to 1.8.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-21 9:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 9:02 [rpms/python-pyperclip] epel10.3: Enable running most of the graphical tests Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox