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] f45: Port to pyproject-rpm-macros (fix RHBZ#2378068)
Date: Mon, 21 Sep 2026 08:03:45 GMT [thread overview]
Message-ID: <178997782569.1.18065451669133149730.rpms-python-pyperclip-069a32af3772@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-pyperclip
Branch : f45
Commit : 069a32af3772b448b4a1129738aee8779740a8a4
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-09-10T14:42:39+01:00
Stats : +35/-59 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-pyperclip/c/069a32af3772b448b4a1129738aee8779740a8a4?branch=f45
Log:
Port to pyproject-rpm-macros (fix RHBZ#2378068)
Let the EPEL8 branch diverge.
---
diff --git a/python-pyperclip.spec b/python-pyperclip.spec
index 2e95757..8bb9c6d 100644
--- a/python-pyperclip.spec
+++ b/python-pyperclip.spec
@@ -2,44 +2,27 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
#
# We can generate PDF documentation as a substitute.
-%bcond_without doc_pdf
+%bcond doc_pdf 1
# Test with XWayland, instead of X11?
-%if %{undefined el8} && %{undefined el9}
-%bcond_without wayland
-%else
-%bcond_with wayland
-%endif
+%bcond wayland %{undefined el9}
Name: python-pyperclip
Version: 1.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A cross-platform clipboard module for Python
License: BSD-3-Clause
URL: https://github.com/asweigart/pyperclip
-Source0: %{pypi_source pyperclip}
+Source: %{pypi_source pyperclip}
# Fix test suite for release 1.9.0
# https://github.com/asweigart/pyperclip/pull/270
-Patch0: pyperclip-1.9.0-tests.patch
+Patch: pyperclip-1.9.0-tests.patch
BuildArch: noarch
-%global common_description %{expand:
-Pyperclip is a cross-platform Python module for copy and paste clipboard
-functions.}
-
-%description %{common_description}
-
-
-%package -n python3-pyperclip
-Summary: %{summary}
-
BuildRequires: dos2unix
-BuildRequires: python3-devel
-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)
@@ -81,6 +64,16 @@ BuildRequires: /usr/bin/wl-paste
# BuildRequires: /usr/bin/klipper
# BuildRequires: /usr/bin/qdbus
+%global common_description %{expand:
+Pyperclip is a cross-platform Python module for copy and paste clipboard
+functions.}
+
+%description %{common_description}
+
+
+%package -n python3-pyperclip
+Summary: %{summary}
+
%description -n python3-pyperclip %{common_description}
@@ -90,38 +83,7 @@ Summary: Pyperclip documentation
%if %{with doc_pdf}
BuildRequires: make
BuildRequires: python3dist(sphinx)
-%if %{undefined el8}
BuildRequires: python3-sphinx-latex
-%else
-BuildRequires: tex(amsmath.sty)
-BuildRequires: tex(amsthm.sty)
-BuildRequires: tex(anyfontsize.sty)
-BuildRequires: tex(article.cls)
-BuildRequires: tex(capt-of.sty)
-BuildRequires: tex(cmap.sty)
-BuildRequires: tex(color.sty)
-BuildRequires: tex(ctablestack.sty)
-BuildRequires: tex(fancyhdr.sty)
-BuildRequires: tex(fancyvrb.sty)
-BuildRequires: tex(fncychap.sty)
-BuildRequires: tex(framed.sty)
-BuildRequires: tex(geometry.sty)
-BuildRequires: tex(hyperref.sty)
-BuildRequires: tex(kvoptions.sty)
-BuildRequires: tex(luatex85.sty)
-BuildRequires: tex(needspace.sty)
-BuildRequires: tex(parskip.sty)
-BuildRequires: tex(polyglossia.sty)
-BuildRequires: tex(tabulary.sty)
-BuildRequires: tex(titlesec.sty)
-BuildRequires: tex(upquote.sty)
-BuildRequires: tex(utf8x.def)
-BuildRequires: tex(wrapfig.sty)
-BuildRequires: texlive-collection-fontsrecommended
-BuildRequires: texlive-collection-latex
-BuildRequires: texlive-dvipng
-BuildRequires: texlive-dvisvgm
-%endif
BuildRequires: latexmk
%endif
@@ -133,8 +95,13 @@ Documentation for pyperclip
%autosetup -p1 -n pyperclip-%{version}
dos2unix --keepdate AUTHORS.txt CHANGES.txt README.md docs/*
+
+%generate_buildrequires
+%pyproject_buildrequires
+
+
%build
-%py3_build
+%pyproject_wheel
%if %{with doc_pdf}
PYTHONPATH="${PWD}/src" %make_build -C docs latex \
@@ -142,10 +109,15 @@ PYTHONPATH="${PWD}/src" %make_build -C docs latex \
%make_build -C docs/_build/latex LATEXMKOPTS='-quiet'
%endif
+
%install
-%py3_install
+%pyproject_install
+%pyproject_save_files -l pyperclip
+
%check
+%pyproject_check_import
+
%if %{with wayland}
%global __pytest /usr/bin/xwfb-run -- pytest
%else
@@ -158,13 +130,12 @@ k="${k-}${k+ and }not TestWlCLipboard"
k="${k-}${k+ and }not TestXSel"
%pytest -k "${k-}" -v
-%files -n python3-pyperclip
-%license LICENSE.txt
+
+%files -n python3-pyperclip -f %{pyproject_files}
%doc AUTHORS.txt
%doc CHANGES.txt
%doc README.md
-%{python3_sitelib}/pyperclip
-%{python3_sitelib}/pyperclip-%{version}-py%{python3_version}.egg-info
+
%files -n python-pyperclip-doc
%license LICENSE.txt
@@ -172,7 +143,12 @@ k="${k-}${k+ and }not TestXSel"
%doc docs/_build/latex/Pyperclip.pdf
%endif
+
%changelog
+* Thu Sep 10 2026 Benjamin A. Beasley <code@musicinmybrain.net> - 1.9.0-2
+- Port to pyproject-rpm-macros (fix RHBZ#2378068)
+- Let the EPEL8 branch diverge
+
* 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
reply other threads:[~2026-09-21 8:03 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=178997782569.1.18065451669133149730.rpms-python-pyperclip-069a32af3772@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