mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
dev-python/system_hotkey: disable py3.8, py3.9
- Fixed broken test - Added virtualx eclass to test with a valid display - Added patch to fix Python compatibility issue - Added missing dependencies to RDEPEND - Added missing PYTHON_USEDEP to RDEPEND Signed-off-by: Devrin Talen <devrin@fastmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
system_hotkey was written for a previous version of Python that had
|
||||
collections.Iterable available. That moved under collections.abc in a
|
||||
later release.
|
||||
|
||||
--- a/system_hotkey/system_hotkey.py
|
||||
+++ b/system_hotkey/system_hotkey.py
|
||||
@@ -281,7 +281,7 @@ class MixIn():
|
||||
|
||||
thread safe
|
||||
'''
|
||||
- assert isinstance(hotkey, collections.Iterable) and type(hotkey) not in (str, bytes)
|
||||
+ assert isinstance(hotkey, collections.abc.Iterable) and type(hotkey) not in (str, bytes)
|
||||
if self.consumer == 'callback' and not callback:
|
||||
raise TypeError('Function register requires callback argument in non sonsumer mode')
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..13} )
|
||||
inherit distutils-r1
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
inherit distutils-r1 virtualx
|
||||
|
||||
DESCRIPTION="Multi-platform system-wide hotkeys"
|
||||
HOMEPAGE="https://github.com/timeyyy/system_hotkey"
|
||||
@@ -17,6 +17,17 @@ SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# TODO this depends on xpybutil
|
||||
RDEPEND=">=dev-python/xcffib-1.5.0"
|
||||
RDEPEND=">=dev-python/xcffib-1.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/xpybutil-0.0.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-xvfb-3.0.0[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests unittest
|
||||
PATCHES=(
|
||||
# Fix for unit test
|
||||
"${FILESDIR}/${P}-fix-collections-iterable.patch"
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_test() {
|
||||
virtx distutils-r1_src_test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user