1 |
commit: f61659ecd2e5a4976c33df582b7457834ab15e91 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 21 13:25:27 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 21 13:49:11 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61659ec |
7 |
|
8 |
dev-python/pyperclip: Use PEP517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild | 65 ++++++++++++++++++++++++++ |
13 |
1 file changed, 65 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild b/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..6671b2930d46 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild |
20 |
@@ -0,0 +1,65 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} ) |
28 |
+ |
29 |
+inherit distutils-r1 virtualx |
30 |
+ |
31 |
+DESCRIPTION="A cross-platform clipboard module for Python" |
32 |
+HOMEPAGE=" |
33 |
+ https://github.com/asweigart/pyperclip/ |
34 |
+ https://pypi.org/project/pyperclip/ |
35 |
+" |
36 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="BSD" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ || ( |
44 |
+ ( |
45 |
+ x11-misc/xsel |
46 |
+ sys-apps/which |
47 |
+ ) |
48 |
+ ( |
49 |
+ x11-misc/xclip |
50 |
+ sys-apps/which |
51 |
+ ) |
52 |
+ ( |
53 |
+ kde-plasma/plasma-workspace |
54 |
+ sys-apps/which |
55 |
+ ) |
56 |
+ dev-python/PyQt5[${PYTHON_USEDEP}] |
57 |
+ dev-python/QtPy[${PYTHON_USEDEP}] |
58 |
+ ) |
59 |
+" |
60 |
+# test at least one backend |
61 |
+BDEPEND=" |
62 |
+ test? ( |
63 |
+ ${RDEPEND} |
64 |
+ ) |
65 |
+" |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ # stupid windows |
69 |
+ find -type f -exec sed -i -e 's:\r$::' {} + || die |
70 |
+ # klipper is hard to get working, and once we make it work, |
71 |
+ # it breaks most of the other backends |
72 |
+ # wl-copy requires wayland, not Xvfb |
73 |
+ sed -e 's:_executable_exists("\(klipper\|wl-copy\)"):False:' \ |
74 |
+ -i tests/test_pyperclip.py || die |
75 |
+ distutils-r1_src_prepare |
76 |
+} |
77 |
+ |
78 |
+python_test() { |
79 |
+ "${EPYTHON}" tests/test_pyperclip.py -vv || |
80 |
+ die "Tests fail on ${EPYTHON}" |
81 |
+} |
82 |
+ |
83 |
+src_test() { |
84 |
+ virtx distutils-r1_src_test |
85 |
+} |