summaryrefslogtreecommitdiff
path: root/dev-python/pyperclip
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/pyperclip
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/pyperclip')
-rw-r--r--dev-python/pyperclip/Manifest5
-rw-r--r--dev-python/pyperclip/files/pyperclip-1.7.0-test-pyqt.patch33
-rw-r--r--dev-python/pyperclip/pyperclip-1.5.27.ebuild23
-rw-r--r--dev-python/pyperclip/pyperclip-1.7.0.ebuild40
4 files changed, 89 insertions, 12 deletions
diff --git a/dev-python/pyperclip/Manifest b/dev-python/pyperclip/Manifest
index 868032807563..d86417b89115 100644
--- a/dev-python/pyperclip/Manifest
+++ b/dev-python/pyperclip/Manifest
@@ -1,5 +1,6 @@
+AUX pyperclip-1.7.0-test-pyqt.patch 1098 BLAKE2B 4fe453df11842615f1c2f2206553b3b98642bef61cc596bf7951f3dca2f15988e5a41bf577a4543ff692ddb7ef22e184c76f53dc982a5c658f067677cc563098 SHA512 4135204bb98d4148524bc6699a39917d4b5d04f5a686e61d283414889a4b6891c3ec5c0a7492a7a0ca95eca12bcce4cfd80beb3c2420a7fc6f4512efa30e2706
DIST pyperclip-1.5.27.zip 16938 BLAKE2B 653b2e74b6f56839ef1f9d59b864218ffd55866660aa7de4284f0bab4c28b0c1aa7a4a65bce0842003d4744a5d40c87943e05bdea13098e250e534a8cb6c2132 SHA512 cefd79f1d246c9aa9d4d0f3d8cdad291ad31bcc2e000c83e5e05704978bbf7b9b45d49667c2e88305d0a5d6baaeacfb47b26bb69fabf89b6b6e3a1e6f1e23d74
DIST pyperclip-1.7.0.tar.gz 15977 BLAKE2B da1473f71bcadcc6dcacdfb6d1a1447b055eb1aa7b31fad76bd3a51245ad9b1e512335f9799d7d416a53b8471ab66c28afa5f9d3f3ee2b39e85d9c239a7e2c79 SHA512 7f22227ea894a236703f61ab950e198fab969fac5713ca8eac6df213183a47a244add88a462b9ddf63ed5bec36af5bc2578949f01ed31e0b63316d1761a935bd
-EBUILD pyperclip-1.5.27.ebuild 468 BLAKE2B 08212fec2b2628b92777c222c9743f161bd662cdf71970e93dbad72f46173f80c1dfe42148d01ee7f7eae312c80d2369b7c92f9599f3f1543325685a5140a2e6 SHA512 9542d0b6bc9fe68c8758d31b8aa5b7aaa319f75defcf660d4b92ce9c59a305dc152a3a2fef00463aad589ca431d03173e63c2f52169c5c47e145d5a55429a57a
-EBUILD pyperclip-1.7.0.ebuild 702 BLAKE2B fbf175bf47f53c1990b5cf2c49115362ba07a3485c356875e9224f8991b1d38efb02ab9121f3f47071c14e7aeabeccdd4b3aae72245475994cb678c29658c861 SHA512 21f30bbcdb1cbe5f84104fc10651e4835f3ee11b85fbe5b88855bf7eeb7f080907a6cb76e413583811a6026e53fec85032b43b798a68f515c66336188c420200
+EBUILD pyperclip-1.5.27.ebuild 639 BLAKE2B 950a102de841fd8b94f9feae7d5dd0630de289dbda78210c01175ead24a45ad66c9a7a10420c6d3ef65e4a0ae3ab0fda23f8e1121bc331daadf22e5f3acb4b39 SHA512 48d1c73cb76d1029ccae18255f733efbaa009a17866b7a88b31f2b5b3cd9f11080932779520d9191416615b1ecc8fca923694b1bbe1d2761d0c099dbc9b1de5a
+EBUILD pyperclip-1.7.0.ebuild 1223 BLAKE2B 299fede05e15289a8cbe50859862e5a6cc1e10114e554cb184c554416107a91bbfe100797f7f4bb0558c9b0a0049c317741c2a387d49e39680db47eece5d0385 SHA512 d94bac216d464a6f886444d325eaf3e88d0369036c389938228f9db2893d2ebf381fb97d547306465e0c378be65f6b1c7258275cc2ecaed5e5a7f895531d379c
MISC metadata.xml 357 BLAKE2B 05722f76dcf8c454fb3eb76c2b98cccfb7f2a3d67a72a7e5d79a5444dc89e042261a711d89ddfed8c3cd705bc266b1a17a5372bf59207090c8f856998c2a267f SHA512 1fb9193b49c08c22fed7e498d31551d5f8afcb0551bf63bb9ed605a6b39e5e059276739170b39765ae56ee4faa42fbda892fd54363955a35f3dd874968cceae3
diff --git a/dev-python/pyperclip/files/pyperclip-1.7.0-test-pyqt.patch b/dev-python/pyperclip/files/pyperclip-1.7.0-test-pyqt.patch
new file mode 100644
index 000000000000..4f1a94955f44
--- /dev/null
+++ b/dev-python/pyperclip/files/pyperclip-1.7.0-test-pyqt.patch
@@ -0,0 +1,33 @@
+From be59ac638e26aff5204a32333f7ebe046003065a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 9 Jun 2020 08:46:46 +0200
+Subject: [PATCH] Make PyQt checks in tests more specific
+
+Test whether the widgets module can be imported rather than 'PyQt?'
+in general. The latter gives false positives if PyQt is uninstalled
+but there are leftover subpackages such as qscintilla. In this case,
+Python 3 imports 'PyQt?' as a namespace.
+---
+ tests/test_pyperclip.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_pyperclip.py b/tests/test_pyperclip.py
+index 7519d94..2942639 100644
+--- a/tests/test_pyperclip.py
++++ b/tests/test_pyperclip.py
+@@ -146,10 +146,10 @@ class TestGtk(_TestClipboard):
+ class TestQt(_TestClipboard):
+ if HAS_DISPLAY:
+ try:
+- import PyQt5
++ import PyQt5.QtWidgets
+ except ImportError:
+ try:
+- import PyQt4
++ import PyQt4.QtGui
+ except ImportError:
+ pass
+ else:
+--
+2.27.0
+
diff --git a/dev-python/pyperclip/pyperclip-1.5.27.ebuild b/dev-python/pyperclip/pyperclip-1.5.27.ebuild
index 15e303b5c97d..f1298bc162c6 100644
--- a/dev-python/pyperclip/pyperclip-1.5.27.ebuild
+++ b/dev-python/pyperclip/pyperclip-1.5.27.ebuild
@@ -3,8 +3,8 @@
EAPI=6
-PYTHON_COMPAT=( python2_7 python3_6 python3_7)
-inherit distutils-r1
+PYTHON_COMPAT=( python2_7 python3_{6..8} )
+inherit distutils-r1 virtualx
DESCRIPTION="A cross-platform clipboard module for Python."
HOMEPAGE="https://github.com/asweigart/pyperclip"
@@ -13,7 +13,20 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 arm64 ~ppc64 x86"
-IUSE=""
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
+RDEPEND="
+ || (
+ x11-misc/xclip
+ x11-misc/xsel
+ dev-python/PyQt5[${PYTHON_USEDEP}]
+ )
+"
+
+python_test() {
+ "${EPYTHON}" tests/test_copy_paste.py -vv ||
+ die "Tests fail on ${EPYTHON}"
+}
+
+src_test() {
+ virtx distutils-r1_src_test
+}
diff --git a/dev-python/pyperclip/pyperclip-1.7.0.ebuild b/dev-python/pyperclip/pyperclip-1.7.0.ebuild
index 67eff3efdd8e..8e4042f67f1f 100644
--- a/dev-python/pyperclip/pyperclip-1.7.0.ebuild
+++ b/dev-python/pyperclip/pyperclip-1.7.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1 virtualx
DESCRIPTION="A cross-platform clipboard module for Python."
@@ -12,16 +12,46 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa ~ia64 ~ppc64 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~ppc64 sparc x86"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="
|| (
- x11-misc/xclip
- x11-misc/xsel
+ (
+ x11-misc/xsel
+ sys-apps/which
+ )
+ (
+ x11-misc/xclip
+ sys-apps/which
+ )
+ (
+ kde-plasma/plasma-workspace
+ sys-apps/which
+ )
dev-python/PyQt5[${PYTHON_USEDEP}]
+ dev-python/QtPy[${PYTHON_USEDEP}]
)
"
+# test at least one backend
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-pyqt.patch
+)
+
+src_prepare() {
+ # stupid windows
+ find -type f -exec sed -i -e 's:\r$::' {} + || die
+ # klipper is hard to get working, and once we make it work,
+ # it breaks most of the other backends
+ sed -e 's:_executable_exists("klipper"):False:' \
+ -i tests/test_pyperclip.py || die
+ distutils-r1_src_prepare
+}
python_test() {
"${EPYTHON}" tests/test_pyperclip.py -vv ||