1+ # Sphinx-generated HTML documentation is not suitable for packaging; see
2+ # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
3+ #
4+ # We can generate PDF documentation as a substitute.
5+ %bcond_without doc_pdf
16Vendor: Microsoft Corporation
27Distribution: Azure Linux
3- %global pypi_name pyperclip
48
5-
6- Name: python-%{pypi_name }
7- Version: 1.6.4
8- Release: 9%{?dist }
9+ Name: python-pyperclip
10+ Version: 1.8.2
11+ Release: 12%{?dist }
912Summary: A cross-platform clipboard module for Python
1013
11- License: BSD
14+ License: BSD-3-Clause
1215URL: https://github.com/asweigart/pyperclip
13- Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name }/%{pypi_name }-%{version }.tar.gz#/python-%{pypi_name}-%{version}.tar.gz
14- Source1: %{name }-LICENSE.txt
15- # Fix tests suite execution
16- # Disable all tests requiring a display or toolkit to be available at build time
17- Patch001: 0001-Skip-tests-irrelevant-in-the-context-of-Fedora-packa.patch
16+ Source0: %{pypi_source pyperclip}
1817BuildArch: noarch
1918
20- BuildRequires: git
21-
22- %description
19+ %global common_description %{expand:
2320Pyperclip is a cross-platform Python module for copy and paste clipboard
24- functions.
21+ functions.}
22+
23+ %description %{common_description }
2524
26- %package -n python3-%{pypi_name }
25+
26+ %package -n python3-pyperclip
2727Summary: %{summary }
28- %{?python_provide:%python_provide python3-%{pypi_name }}
2928
3029BuildRequires: python3-devel
30+ BuildRequires: python3-wheel
3131BuildRequires: python3-setuptools
3232
33- %description -n python3-%{pypi_name }
34- Pyperclip is a cross-platform Python module for copy and paste clipboard
35- functions.
33+ # While upstream runs tests directly with Python/unittest, using pytest as the
34+ # runner allows us to more easily skip tests.
35+ BuildRequires: python3dist(pytest)
36+ BuildRequires: xorg-x11-server-Xvfb
3637
38+ %description -n python3-pyperclip %{common_description }
3739
38- %package -n python-%{ pypi_name } -doc
40+ %package -n python-pyperclip -doc
3941Summary: Pyperclip documentation
40- BuildRequires: python3-sphinx
42+ BuildRequires: python3dist(sphinx)
43+ BuildRequires: make
4144
42- %description -n python-%{ pypi_name } -doc
45+ %description -n python-pyperclip -doc
4346Documentation for pyperclip
4447
4548
4649%prep
47- %autosetup -n %{pypi_name }-%{version } -S git
48- cp %{SOURCE1 } ./LICENSE.txt
49- # Remove bundled egg-info
50- rm -rf %{pypi_name }.egg-info
51-
50+ %autosetup -p1 -n pyperclip-%{version }
5251# Fix ends of line encoding
5352sed -i ' s/\r$//' README.md docs/*
5453
@@ -63,25 +62,92 @@ rm -rf html/.{doctrees,buildinfo}
6362%py3_install
6463
6564%check
66- %{__python3} setup.py test
67-
68-
69- %files -n python3-%{pypi_name }
65+ %global __pytest /usr/bin/xvfb-run -a %{python3 } -m pytest
66+ # Explicitly skip backends that we know will fail in the mock environment if
67+ # their dependencies happen to be present. See notes in the BuildRequires.
68+ k=" ${k-}${k+ and } not TestGtk"
69+ k=" ${k-}${k+ and } not TestKlipper"
70+ k=" ${k-}${k+ and } not TestWlCLipboard"
71+ k=" ${k-}${k+ and } not TestXSel"
72+ %pytest -k " ${k-} " -v
73+
74+ %files -n python3-pyperclip
7075%license LICENSE.txt
76+ %doc AUTHORS.txt
77+ %doc CHANGES.txt
7178%doc README.md
72- %{python3_sitelib }/%{ pypi_name }
73- %{python3_sitelib }/%{ pypi_name } -%{version }-py? . ? .egg-info
79+ %{python3_sitelib }/pyperclip
80+ %{python3_sitelib }/pyperclip -%{version }-py%{ python3_version } .egg-info
7481
75- %files -n python-%{ pypi_name } -doc
82+ %files -n python-pyperclip -doc
7683%license LICENSE.txt
77- %doc html
7884
7985%changelog
80- *
Fri Dec 01 2021 Thomas Crain <[email protected] > -
1.6.4-9 86+ *
Mon Jun 16 2025 Archana Shettigar <[email protected] > -
1.8.2-12 87+ - Initial Azure Linux import from Fedora 42 (license: MIT).
8188- License verified
8289
83- *
Fri Oct 15 2021 Pawel Winogrodzki <[email protected] > -
1.6.4-8 84- - Initial CBL-Mariner import from Fedora 32 (license: MIT).
90+ *
Sat Jan 18 2025 Fedora Release Engineering <[email protected] > -
1.8.2-11 91+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
92+
93+ *
Fri Jul 19 2024 Fedora Release Engineering <[email protected] > -
1.8.2-10 94+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
95+
96+ *
Fri Jun 07 2024 Python Maint <[email protected] > -
1.8.2-9 97+ - Rebuilt for Python 3.13
98+
99+ *
Fri Jan 26 2024 Fedora Release Engineering <[email protected] > -
1.8.2-8 100+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
101+
102+ *
Mon Jan 22 2024 Fedora Release Engineering <[email protected] > -
1.8.2-7 103+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
104+
105+ *
Fri Jul 21 2023 Fedora Release Engineering <[email protected] > -
1.8.2-6 106+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
107+
108+ *
Fri Jun 16 2023 Python Maint <[email protected] > -
1.8.2-5 109+ - Rebuilt for Python 3.12
110+
111+ *
Fri Jan 20 2023 Fedora Release Engineering <[email protected] > -
1.8.2-4 112+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
113+
114+ *
Tue Nov 29 2022 Benjamin A. Beasley <[email protected] > -
1.8.2-3 115+ - Update License to SPDX
116+
117+ *
Fri Aug 12 2022 Benjamin A. Beasley <[email protected] > -
1.8.2-2 118+ - Enable running most of the graphical tests
119+ - Switch Sphinx documentation to PDF to sidestep guidelines issues
120+
121+ *
Mon Aug 08 2022 Jonathan Wright <[email protected] > -
1.8.2-1 122+ - Update to 1.8.2
123+
124+ *
Fri Jul 22 2022 Fedora Release Engineering <[email protected] > -
1.8.0-8 125+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
126+
127+ *
Mon Jun 13 2022 Python Maint <[email protected] > -
1.8.0-7 128+ - Rebuilt for Python 3.11
129+
130+ *
Fri Jan 21 2022 Fedora Release Engineering <[email protected] > -
1.8.0-6 131+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
132+
133+ *
Fri Jul 23 2021 Fedora Release Engineering <[email protected] > -
1.8.0-5 134+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
135+
136+ *
Fri Jun 04 2021 Python Maint <[email protected] > -
1.8.0-4 137+ - Rebuilt for Python 3.10
138+
139+ *
Wed Jan 27 2021 Fedora Release Engineering <[email protected] > -
1.8.0-3 140+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
141+
142+ *
Wed Jul 29 2020 Fedora Release Engineering <[email protected] > -
1.8.0-2 143+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
144+
145+ *
Tue Jun 16 2020 Ken Dreyer <[email protected] > -
1.8.0-1 146+ - Update to 1.8.0 (rhbz#1697423)
147+ - Use non-git autosetup for simplicity
148+
149+ *
Tue May 26 2020 Miro Hrončok <[email protected] > -
1.6.4-8 150+ - Rebuilt for Python 3.9
85151
86152*
Thu Jan 30 2020 Fedora Release Engineering <[email protected] > -
1.6.4-7 87153- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0 commit comments