From 1121d13d3af51ca10b03a36b0ef05e543ca90a378c65673776755252b914258c Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Thu, 1 May 2025 20:30:56 +0000 Subject: [PATCH] - Update to 1.9.2 * Use Generic to set precise type for InputDevice.path. * Allow supressing build-dependent information in ecodes.c. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-evdev?expand=0&rev=40 --- .gitattributes | 23 +++++ .gitignore | 1 + _service | 3 + fix-tests.patch | 25 ++++++ python-evdev-1.7.1.tar.gz | 3 + python-evdev-1.8.0.tar.gz | 3 + python-evdev-1.9.0.tar.gz | 3 + python-evdev-1.9.1.tar.gz | 3 + python-evdev-1.9.2.tar.gz | 3 + python-evdev.changes | 182 ++++++++++++++++++++++++++++++++++++++ python-evdev.spec | 68 ++++++++++++++ 11 files changed, 317 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 fix-tests.patch create mode 100644 python-evdev-1.7.1.tar.gz create mode 100644 python-evdev-1.8.0.tar.gz create mode 100644 python-evdev-1.9.0.tar.gz create mode 100644 python-evdev-1.9.1.tar.gz create mode 100644 python-evdev-1.9.2.tar.gz create mode 100644 python-evdev.changes create mode 100644 python-evdev.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..eb0b1ca --- /dev/null +++ b/_service @@ -0,0 +1,3 @@ + + + diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..742d20e --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,25 @@ +From: Georgi Valkov +Date: Sat, 25 Jan 2025 18:04:39 +0100 +Subject: [PATCH] Fix tests +Upstream: merged + +This is pulled from upstream main branch where it was committed right after the release. + +--- + tests/test_util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_util.py b/tests/test_util.py +index 5a979df..7112927 100644 +--- a/tests/test_util.py ++++ b/tests/test_util.py +@@ -6,7 +6,7 @@ def test_match_ecodes_a(): + assert res == {1: [372, 418, 419, 420]} + assert dict(util.resolve_ecodes_dict(res)) == { + ("EV_KEY", 1): [ +- (["KEY_FULL_SCREEN", "KEY_ZOOM"], 372), ++ (("KEY_FULL_SCREEN", "KEY_ZOOM"), 372), + ("KEY_ZOOMIN", 418), + ("KEY_ZOOMOUT", 419), + ("KEY_ZOOMRESET", 420), + diff --git a/python-evdev-1.7.1.tar.gz b/python-evdev-1.7.1.tar.gz new file mode 100644 index 0000000..9b45ed1 --- /dev/null +++ b/python-evdev-1.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f09ccbb89880dd82c7f71482b662fb1ebb5824968cac0cd3d4e50b9f7715f6a +size 88275 diff --git a/python-evdev-1.8.0.tar.gz b/python-evdev-1.8.0.tar.gz new file mode 100644 index 0000000..1407bcf --- /dev/null +++ b/python-evdev-1.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:886a7d55fd734ec9bda65e3620d401ad3147201ea9dbc086ca5dbb3e70c505b5 +size 47568 diff --git a/python-evdev-1.9.0.tar.gz b/python-evdev-1.9.0.tar.gz new file mode 100644 index 0000000..61a69fd --- /dev/null +++ b/python-evdev-1.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9783a80dca381b9258f74a80a8f7be3fcd7e1c8206752bc428b1b88be22ab369 +size 47965 diff --git a/python-evdev-1.9.1.tar.gz b/python-evdev-1.9.1.tar.gz new file mode 100644 index 0000000..3a6e5d3 --- /dev/null +++ b/python-evdev-1.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:958e8aad958250428a57ff6c6fb8e2c254737affaca654165d9222f5a279698b +size 48554 diff --git a/python-evdev-1.9.2.tar.gz b/python-evdev-1.9.2.tar.gz new file mode 100644 index 0000000..f2a48cd --- /dev/null +++ b/python-evdev-1.9.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cfb65765b8c63e587110d9b42fa26806bd6dd76565c55c3618afd4c4c48c5a5 +size 48925 diff --git a/python-evdev.changes b/python-evdev.changes new file mode 100644 index 0000000..d920a63 --- /dev/null +++ b/python-evdev.changes @@ -0,0 +1,182 @@ +------------------------------------------------------------------- +Thu May 1 20:11:01 UTC 2025 - Matthias Bach - 1.9.2 + +- Update to 1.9.2 + * Use Generic to set precise type for InputDevice.path. + * Allow supressing build-dependent information in ecodes.c. + +------------------------------------------------------------------- +Sat Feb 22 11:48:15 UTC 2025 - Matthias Bach - 1.9.1 + +- Update to 1.9.1 + * Fix fox missing UI_FF constants in generated ecodes.py. + * More type annotations. + +------------------------------------------------------------------- +Mon Feb 10 19:03:30 UTC 2025 - Matthias Bach - 1.9.0 + +- Update to 1.9.0 + * Slightly faster reading of events in device.read() and + device.read_one(). + * Drop deprecated InputDevice.fn (use InputDevice.path instead). + * Improve type hint coverage and add a py.typed file. +- Remove fix-tests.patch as it was included upstream. + +------------------------------------------------------------------- +Wed Jan 29 19:36:45 UTC 2025 - Matthias Bach - 1.8.0 + +- Update to 1.8.0 + * The evdev.ecodes module is now generated at install time and + contains only constants. This allows type checking and + introspection of the evdev.ecodes module, without having to + execute it first. The old module is available as + evdev.ecodes_runtime. + * Reverse mappings in evdev.ecodes that point to more than one + value are now tuples instead of lists. + * Fix keyboard delay and repeat being swapped. + * Move the syn() convenience method from InputDevice to EventIO. +- Add fix-tests.patch to pull in test fixes that upstream only + included after tagging their release. +- Switch source download during packaging from disabledrun to + manualrun. + +------------------------------------------------------------------- +Thu May 9 09:18:42 UTC 2024 - Matthias Bach - 1.7.1 + +- Update to 1.7.1 + * Wait up to two seconds for uinput devices to appear. + +------------------------------------------------------------------- +Mon Feb 19 18:59:44 UTC 2024 - Matthias Bach - 1.7.0 + +- Update to 1.7.0 + * Add the uniq address to the string representation of InputDevice. + * Improved method for finding the device node corresponding to a + uinput device +- Adjust package build to upstream's switch to pyproject.toml. +- Drop obsolete Leap 15.3 compatiblity handling in spec file. + +------------------------------------------------------------------- +Wed Jul 12 12:35:05 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Mon Jan 23 14:25:52 UTC 2023 - Matthias Bach - 1.6.1 + +- Update to 1.6.1 + * No changelog was made available. +- Fix source URL as upstream no longer creates Github releases but + only tags. +- Add a _service file for easier source download. + +------------------------------------------------------------------- +Wed Jul 20 20:11:21 UTC 2022 - Matthias Bach - 1.6.0 + +- Update to 1.6.0 + * Fix Python 3.11 compatibility +- Drop packaging for Python 2 + +------------------------------------------------------------------- +Sat Mar 26 11:04:09 UTC 2022 - Matthias Bach - 1.5.0 + +- Update to 1.5.0 + * Input device is now closed from main thread in + InputDevice.close() + * util.find_ecodes_by_regex now works across all Python versions +- Drop evdev-re-Pattern.patch now included upstream + +------------------------------------------------------------------- +Mon Jan 10 20:16:20 UTC 2022 - Matthias Bach + +- Work around broken pytest macro on Leap 15.3 + +------------------------------------------------------------------- +Fri Apr 9 20:28:30 UTC 2021 - Ben Greiner + +- Add evdev-re-Pattern.patch -- gh#gvalkov/python-evdev#152 + +------------------------------------------------------------------- +Sat Jan 23 01:05:35 UTC 2021 - Dirk Müller + +- update to 1.4.0: +- Fix ``InputDevice.set_absinfo`` to allow setting parameters to zero. +- Fix off-by-one in ``ioctl_EVIOCG_bits``, which causes value at the end of the + list to not be reported back +- Fix ``set_absinfo`` to allow setting parameters to zero +- Fix leak when returning ``BlockingIOError`` from a read +- Fix "There is no current event loop in thread" error for non asyncio code +- Prevent ``InputDevice`` destructor from blocking +- Add missing return codes to ``os.strerror()`` calls and fix force feedback +- Add the ``util.find_ecodes_by_regex()`` helper function. + +------------------------------------------------------------------- +Thu Dec 24 18:16:44 UTC 2020 - Matthias Bach - 1.3.0 + +- Modernise spec file + +------------------------------------------------------------------- +Sun Jan 12 16:55:08 UTC 2020 - Matthias Bach + +- Update to 1.3.0 + * Fix build on 32bit arches with 64bit time_t. + * Add functionality to query device properties. See + InputDevice.input_props and the input_props argument to Uinput. + * KeyEvent received an allow_unknown constructor argument, which + determines what will happen when an event code cannot be mapped + to a keycode. The default and behavior so far has been to raise + KeyError. If set to True, the keycode will be set to the event + code formatted as a hex number. + * Add InputDevice.set_absinfo() and InputDevice.absinfo(). + * Instruct the asyncio event loop to stop monitoring the fd of + the input device when the device is closed. + +------------------------------------------------------------------- +Tue May 14 07:09:23 UTC 2019 - Ondřej Súkup + +- update to 1.2.0 + * Add UInput support for the resolution parameter in AbsInfo + * Vendor and product identifiers can be greater or equal to 0x8000 + +------------------------------------------------------------------- +Fri Mar 1 11:01:57 UTC 2019 - Tomáš Chvátal + +- Update to 1.1.2: + * Fix handling of absinfo capabilities + * Fix invalid example + * Check if FF_MAX_EFFECTS is defined + +------------------------------------------------------------------- +Tue Aug 28 08:00:44 UTC 2018 - marix@marix.org + +- Update to version 1.1.0 + * Add support for handling force-feedback effect uploads. + * Fix typo preventing force-feedback effects that need left + coefficients from working. +- Add _service file to fetch source from Git. + +------------------------------------------------------------------- +Tue Jun 5 20:06:40 UTC 2018 - marix@marix.org + +- Run tests during packaging. + * This runs only those tests which do not require /dev/uinput. +- Changed to source taken directly from Git instead of PyPI. + +------------------------------------------------------------------- +Mon Jun 4 20:07:15 UTC 2018 - marix@marix.org + +- Update to version 1.0.0 + * Fixed asyncio support in Python 3.5+. + * Fixed handling of missing data. + * Fixed device comparison. + * Deprecated the InputDevice.fn attribute in favour of + InputDevice.path + * Add a context manager for grabbing access to a device - + InputDevice.grab_context. + * Add the InputDevice.uniq attribute, which contains the unique + identifier of the device. + +------------------------------------------------------------------- +Mon Jan 29 15:33:32 UTC 2018 - jengelh@inai.de + +- Initial package for openSUSE distro diff --git a/python-evdev.spec b/python-evdev.spec new file mode 100644 index 0000000..f01029d --- /dev/null +++ b/python-evdev.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-evdev +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define modname evdev +%{?sle15_python_module_pythons} +Name: python-evdev +Version: 1.9.2 +Release: 0 +Summary: Python bindings to the Linux input handling subsystem +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/gvalkov/python-evdev +# Source needs to be pulled form Github as the source distribution on PyPI lacks the test directory +Source: https://github.com/gvalkov/python-evdev/archive/refs/tags/v%{version}.tar.gz#/python-evdev-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools >= 61.0} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%python_subpackages + +%description +python-evdev provides bindings to the generic input event interface +in Linux. The evdev interface serves the purpose of passing events +generated in the kernel directly to userspace through character +devices that are typically located in /dev/input/. + +This package also comes with bindings to uinput, the userspace input +subsystem. Uinput allows userspace programs to create and handle +input devices that can inject events directly into the input +subsystem. + +%prep +%autosetup -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}/%{$python_sitearch} +%python_expand rm %{buildroot}/%{$python_sitearch}/%{modname}/*.c + +%check +%pytest_arch tests -k 'not test_uinput' + +%files %{python_files} +%{python_sitearch}/evdev* +%license LICENSE + +%changelog