summaryrefslogtreecommitdiff
path: root/dev-python/pyperclip/pyperclip-1.7.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pyperclip/pyperclip-1.7.0.ebuild')
-rw-r--r--dev-python/pyperclip/pyperclip-1.7.0.ebuild40
1 files changed, 35 insertions, 5 deletions
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 ||