public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pyperclip] epel8: Use xwayland-run for tests where we can
Date: Mon, 21 Sep 2026 14:27:48 GMT	[thread overview]
Message-ID: <179000086872.1.9206357571164656754.rpms-python-pyperclip-de3d6440a3a3@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-pyperclip
Branch : epel8
Commit : de3d6440a3a357b3ed74bf6d0082ebeb3f0af4a4
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-09-21T14:58:24+01:00
Stats  : +20/-3 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyperclip/c/de3d6440a3a357b3ed74bf6d0082ebeb3f0af4a4?branch=epel8

Log:
Use xwayland-run for tests where we can

---
diff --git a/python-pyperclip.spec b/python-pyperclip.spec
index 78cc1c3..c64e77a 100644
--- a/python-pyperclip.spec
+++ b/python-pyperclip.spec
@@ -3,6 +3,12 @@
 #
 # We can generate PDF documentation as a substitute.
 %bcond_without doc_pdf
+# Test with XWayland, instead of X11?
+%if %{undefined el8} && %{undefined el9}
+%bcond_without wayland
+%else
+%bcond_with wayland
+%endif
 
 Name:           python-pyperclip
 Version:        1.9.0
@@ -37,7 +43,11 @@ BuildRequires:  python3dist(setuptools)
 BuildRequires:  python3dist(pytest)
 
 # Support graphical tests in non-graphical environment
+%if %{with wayland}
+BuildRequires:  xwayland-run
+%else
 BuildRequires:  xorg-x11-server-Xvfb
+%endif
 
 # TestQt (module PyQt5.QtWidgets)
 BuildRequires:  python3dist(pyqt5)
@@ -50,13 +60,15 @@ BuildRequires:  /usr/bin/xclip
 # figure out why.
 # BuildRequires:  /usr/bin/xsel
 
+%if %{with wayland}
 # TestWlClipboard (executables wl-copy/wl-paste)
 # This only works in a Wayland session; otherwise, we get:
 #   error: XDG_RUNTIME_DIR is invalid or not set in the environment.
 #   Failed to connect to a Wayland server: No such file or directory
 #   Note: WAYLAND_DISPLAY is unset (falling back to wayland-0)
-# BuildRequires:  /usr/bin/wl-copy
-# BuildRequires:  /usr/bin/wl-paste
+BuildRequires:  /usr/bin/wl-copy
+BuildRequires:  /usr/bin/wl-paste
+%endif
 
 # TestKlipper (executables klipper and qdbus)
 # These would fail with:
@@ -76,7 +88,7 @@ Summary:        Pyperclip documentation
 %if %{with doc_pdf}
 BuildRequires:  make
 BuildRequires:  python3dist(sphinx)
-%if ! 0%{?el8}
+%if %{undefined el8}
 BuildRequires:  python3-sphinx-latex
 %else
 BuildRequires:  tex(amsmath.sty)
@@ -133,7 +145,11 @@ PYTHONPATH="${PWD}/src" %make_build -C docs latex \
 %py3_install
 
 %check
+%if %{with wayland}
+%global __pytest /usr/bin/xwfb-run -- pytest
+%else
 %global __pytest /usr/bin/xvfb-run -a %{python3} -m pytest
+%endif
 # Explicitly skip backends that we know will fail in the mock environment if
 # their dependencies happen to be present. See notes in the BuildRequires.
 k="${k-}${k+ and }not TestKlipper"
@@ -158,6 +174,7 @@ k="${k-}${k+ and }not TestXSel"
 %changelog
 * Thu Sep 10 2026 Benjamin A. Beasley <code@musicinmybrain.net> - 1.9.0-1
 - Update to 1.9.0
+- Use xwayland-run for tests where we can
 
 * Tue Nov 29 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.8.2-3
 - Update License to SPDX

                 reply	other threads:[~2026-09-21 14:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179000086872.1.9206357571164656754.rpms-python-pyperclip-de3d6440a3a3@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox