public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyperclip] epel9: Port to pyproject-rpm-macros (fix RHBZ#2378068)
@ 2026-09-21 10:53 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-21 10:53 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-pyperclip
            Branch : epel9
            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=epel9

            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

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

only message in thread, other threads:[~2026-09-21 10:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 10:53 [rpms/python-pyperclip] epel9: Port to pyproject-rpm-macros (fix RHBZ#2378068) 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