From 157b45a9095c8bbcea440e7aeaa13d598793af6d Mon Sep 17 00:00:00 2001 From: Dale Showers Date: Tue, 2 Jun 2026 15:34:27 -0400 Subject: [PATCH] dev-python/pynput: add 1.8.2 Add python 14 Signed-off-by: Dale Showers --- dev-python/pynput/Manifest | 1 + dev-python/pynput/files/patches/uinput.patch | 20 +------------- dev-python/pynput/pynput-1.8.2.ebuild | 28 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 dev-python/pynput/pynput-1.8.2.ebuild diff --git a/dev-python/pynput/Manifest b/dev-python/pynput/Manifest index b5e74eac5a..8e60b03e0d 100644 --- a/dev-python/pynput/Manifest +++ b/dev-python/pynput/Manifest @@ -1,2 +1,3 @@ DIST pynput-1.7.6.tar.gz 79501 BLAKE2B cb356271ef0688ff6532fb79b858c10fb3a52abc4f6db5f4758948cb16f01e96e9377894ea211952b58f5ff6d997ceeec9ba51a29aef866e65cd83900a9894ae SHA512 66639096a83b7ea7c926bfab67ef6c54b913fc4ffe5814bbc4ace6e4d298237a3623066f4f5c08a2bcf1cc5e40d18dc35b77c18afbd0d00b7b4bf4ed2233d9ff DIST pynput-1.8.1.tar.gz 82289 BLAKE2B 07338c7d3f755af103d0f61874d536a0444cdddf0c3a450e51cf87e1375943fffcf20a747f25b2ca53365250e8e09d403421cf658077603b7c86a9e5794d3bd6 SHA512 4f28bbc908a4ecbfb8ef1d5b222ddc36269fe2f6361a45609afd60196eb05474569efd2267ae2028abfb85eae6825cea6215351974419ca640c7e069e6983132 +DIST pynput-1.8.2.tar.gz 82818 BLAKE2B 236ac06927423b6311cbf176776279cdfb96b7a2b5a76eab84bab2ea01c16a98d6414e224009a51408d9c43b9cdf04cb9f77b10bd7d26947753a032e6fa4b044 SHA512 326d6044f4d96f421e98fe37d792feb2b2525e4c95632ad5ac94eb2b4501ea1ada3a54c117fd85d380f1d7e0598094fb331af9275d6b17efc274e276ebb48743 diff --git a/dev-python/pynput/files/patches/uinput.patch b/dev-python/pynput/files/patches/uinput.patch index a464b02af0..44d17e803e 100644 --- a/dev-python/pynput/files/patches/uinput.patch +++ b/dev-python/pynput/files/patches/uinput.patch @@ -2,7 +2,7 @@ diff --git a/lib/pynput/_util/uinput.py b/lib/pynput/_util/uinput.py index b0a6a78..c891b83 100644 --- a/lib/pynput/_util/uinput.py +++ b/lib/pynput/_util/uinput.py -@@ -72,6 +72,14 @@ def _device(self, paths): +@@ -72,6 +72,14 @@ class ListenerMixin(object): except OSError: continue @@ -17,21 +17,3 @@ index b0a6a78..c891b83 100644 # Does this device provide more handled event codes? capabilities = next_dev.capabilities() next_count = sum( -diff --git a/lib/pynput/keyboard/_uinput.py b/lib/pynput/keyboard/_uinput.py -index 2f63dd3..747d19d 100644 ---- a/lib/pynput/keyboard/_uinput.py -+++ b/lib/pynput/keyboard/_uinput.py -@@ -204,10 +204,10 @@ def as_char(k): - as_char(key): ( - vk, - set() -- | {Key.shift} if i & 1 else set() -- | {Key.alt_gr} if i & 2 else set()) -+ | ({Key.shift} if i & 1 else set()) -+ | ({Key.alt_gr} if i & 2 else set())) - for vk, keys in self._vk_table.items() -- for i, key in enumerate(keys) -+ for i, key in reversed(list(enumerate(keys))) - if key is not None and as_char(key) is not None} - - def for_vk(self, vk, modifiers): diff --git a/dev-python/pynput/pynput-1.8.2.ebuild b/dev-python/pynput/pynput-1.8.2.ebuild new file mode 100644 index 0000000000..a3c795b376 --- /dev/null +++ b/dev-python/pynput/pynput-1.8.2.ebuild @@ -0,0 +1,28 @@ +# Copyright 2021-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12..14} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 pypi + +DESCRIPTION="Sends virtual input commands" +HOMEPAGE="https://github.com/moses-palmer/pynput https://pypi.org/project/pynput" +RDEPEND=" + dev-python/evdev[${PYTHON_USEDEP}] + X? ( dev-python/python-xlib[${PYTHON_USEDEP}] ) + dev-python/six[${PYTHON_USEDEP}] +" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="X" + +PATCHES=( + # issue # 657 + "${FILESDIR}/patches/uinput.patch" + # Remove deprecated bdist_wheel.universal + "${FILESDIR}/patches/wheel.patch" +)