summaryrefslogtreecommitdiff
path: root/dev-python/pyperclip
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/pyperclip
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/pyperclip')
-rw-r--r--dev-python/pyperclip/Manifest2
-rw-r--r--dev-python/pyperclip/files/pyperclip-1.7.0-test-pyqt.patch33
-rw-r--r--dev-python/pyperclip/metadata.xml13
-rw-r--r--dev-python/pyperclip/pyperclip-1.5.27.ebuild32
-rw-r--r--dev-python/pyperclip/pyperclip-1.7.0.ebuild63
5 files changed, 143 insertions, 0 deletions
diff --git a/dev-python/pyperclip/Manifest b/dev-python/pyperclip/Manifest
new file mode 100644
index 000000000000..539f4b1e1183
--- /dev/null
+++ b/dev-python/pyperclip/Manifest
@@ -0,0 +1,2 @@
+DIST pyperclip-1.5.27.zip 16938 BLAKE2B 653b2e74b6f56839ef1f9d59b864218ffd55866660aa7de4284f0bab4c28b0c1aa7a4a65bce0842003d4744a5d40c87943e05bdea13098e250e534a8cb6c2132 SHA512 cefd79f1d246c9aa9d4d0f3d8cdad291ad31bcc2e000c83e5e05704978bbf7b9b45d49667c2e88305d0a5d6baaeacfb47b26bb69fabf89b6b6e3a1e6f1e23d74
+DIST pyperclip-1.7.0.tar.gz 15977 BLAKE2B da1473f71bcadcc6dcacdfb6d1a1447b055eb1aa7b31fad76bd3a51245ad9b1e512335f9799d7d416a53b8471ab66c28afa5f9d3f3ee2b39e85d9c239a7e2c79 SHA512 7f22227ea894a236703f61ab950e198fab969fac5713ca8eac6df213183a47a244add88a462b9ddf63ed5bec36af5bc2578949f01ed31e0b63316d1761a935bd
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/metadata.xml b/dev-python/pyperclip/metadata.xml
new file mode 100644
index 000000000000..de9a45726bf7
--- /dev/null
+++ b/dev-python/pyperclip/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/pyperclip/pyperclip-1.5.27.ebuild b/dev-python/pyperclip/pyperclip-1.5.27.ebuild
new file mode 100644
index 000000000000..f1298bc162c6
--- /dev/null
+++ b/dev-python/pyperclip/pyperclip-1.5.27.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm64 ~ppc64 x86"
+
+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
new file mode 100644
index 000000000000..8e4042f67f1f
--- /dev/null
+++ b/dev-python/pyperclip/pyperclip-1.7.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+inherit distutils-r1 virtualx
+
+DESCRIPTION="A cross-platform clipboard module for Python."
+HOMEPAGE="https://github.com/asweigart/pyperclip"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~ppc64 sparc x86"
+
+RDEPEND="
+ || (
+ (
+ 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 ||
+ die "Tests fail on ${EPYTHON}"
+}
+
+src_test() {
+ virtx distutils-r1_src_test
+}