evdev 1.7.0__tar.gz → 1.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {evdev-1.7.0/evdev.egg-info → evdev-1.7.1}/PKG-INFO +22 -19
  2. evdev-1.7.1/README.md +27 -0
  3. {evdev-1.7.0 → evdev-1.7.1}/evdev/uinput.c +2 -0
  4. {evdev-1.7.0 → evdev-1.7.1}/evdev/uinput.py +18 -6
  5. {evdev-1.7.0 → evdev-1.7.1/evdev.egg-info}/PKG-INFO +22 -19
  6. {evdev-1.7.0 → evdev-1.7.1}/evdev.egg-info/SOURCES.txt +1 -1
  7. {evdev-1.7.0 → evdev-1.7.1}/pyproject.toml +4 -4
  8. evdev-1.7.0/README.rst +0 -24
  9. {evdev-1.7.0 → evdev-1.7.1}/LICENSE +0 -0
  10. {evdev-1.7.0 → evdev-1.7.1}/MANIFEST.in +0 -0
  11. {evdev-1.7.0 → evdev-1.7.1}/evdev/__init__.py +0 -0
  12. {evdev-1.7.0 → evdev-1.7.1}/evdev/device.py +0 -0
  13. {evdev-1.7.0 → evdev-1.7.1}/evdev/ecodes.py +0 -0
  14. {evdev-1.7.0 → evdev-1.7.1}/evdev/eventio.py +0 -0
  15. {evdev-1.7.0 → evdev-1.7.1}/evdev/eventio_async.py +0 -0
  16. {evdev-1.7.0 → evdev-1.7.1}/evdev/events.py +0 -0
  17. {evdev-1.7.0 → evdev-1.7.1}/evdev/evtest.py +0 -0
  18. {evdev-1.7.0 → evdev-1.7.1}/evdev/ff.py +0 -0
  19. {evdev-1.7.0 → evdev-1.7.1}/evdev/genecodes.py +0 -0
  20. {evdev-1.7.0 → evdev-1.7.1}/evdev/input.c +0 -0
  21. {evdev-1.7.0 → evdev-1.7.1}/evdev/util.py +0 -0
  22. {evdev-1.7.0 → evdev-1.7.1}/evdev.egg-info/dependency_links.txt +0 -0
  23. {evdev-1.7.0 → evdev-1.7.1}/evdev.egg-info/top_level.txt +0 -0
  24. {evdev-1.7.0 → evdev-1.7.1}/setup.cfg +0 -0
  25. {evdev-1.7.0 → evdev-1.7.1}/setup.py +0 -0
  26. {evdev-1.7.0 → evdev-1.7.1}/tests/test_ecodes.py +0 -0
  27. {evdev-1.7.0 → evdev-1.7.1}/tests/test_events.py +0 -0
  28. {evdev-1.7.0 → evdev-1.7.1}/tests/test_uinput.py +0 -0
  29. {evdev-1.7.0 → evdev-1.7.1}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evdev
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Bindings to the Linux input handling subsystem
5
5
  Author-email: Georgi Valkov <georgi.t.valkov@gmail.com>
6
6
  Maintainer-email: Tobi <proxima@sezanzeb.de>
@@ -44,30 +44,33 @@ Classifier: Topic :: Software Development :: Libraries
44
44
  Classifier: License :: OSI Approved :: BSD License
45
45
  Classifier: Programming Language :: Python :: Implementation :: CPython
46
46
  Requires-Python: >=3.6
47
- Description-Content-Type: text/x-rst
47
+ Description-Content-Type: text/markdown
48
48
  License-File: LICENSE
49
49
 
50
- *evdev*
51
- -------
50
+ # evdev
52
51
 
53
- This package provides bindings to the generic input event interface in
54
- Linux. The *evdev* interface serves the purpose of passing events
55
- generated in the kernel directly to userspace through character
56
- devices that are typically located in ``/dev/input/``.
52
+ <p>
53
+ <a href="https://pypi.python.org/pypi/evdev"><img alt="pypi version" src="https://img.shields.io/pypi/v/evdev.svg"></a>
54
+ <a href="https://github.com/gvalkov/python-evdev/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/evdev"></a>
55
+ </p>
56
+
57
+ This package provides bindings to the generic input event interface in Linux.
58
+ The *evdev* interface serves the purpose of passing events generated in the
59
+ kernel directly to userspace through character devices that are typically
60
+ located in `/dev/input/`.
57
61
 
58
62
  This package also comes with bindings to *uinput*, the userspace input
59
- subsystem. *Uinput* allows userspace programs to create and handle
60
- input devices that can inject events directly into the input
61
- subsystem.
63
+ subsystem. *Uinput* allows userspace programs to create and handle input devices
64
+ that can inject events directly into the input subsystem.
62
65
 
63
- Documentation:
64
- https://python-evdev.readthedocs.io/en/latest/
66
+ ***Documentation:***
67
+ https://python-evdev.readthedocs.io/en/latest/
65
68
 
66
- Development:
67
- https://github.com/gvalkov/python-evdev
69
+ ***Development:***
70
+ https://github.com/gvalkov/python-evdev
68
71
 
69
- Package:
70
- https://pypi.python.org/pypi/evdev
72
+ ***Package:***
73
+ https://pypi.python.org/pypi/evdev
71
74
 
72
- Changelog:
73
- https://python-evdev.readthedocs.io/en/latest/changelog.html
75
+ ***Changelog:***
76
+ https://python-evdev.readthedocs.io/en/latest/changelog.html
evdev-1.7.1/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # evdev
2
+
3
+ <p>
4
+ <a href="https://pypi.python.org/pypi/evdev"><img alt="pypi version" src="https://img.shields.io/pypi/v/evdev.svg"></a>
5
+ <a href="https://github.com/gvalkov/python-evdev/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/evdev"></a>
6
+ </p>
7
+
8
+ This package provides bindings to the generic input event interface in Linux.
9
+ The *evdev* interface serves the purpose of passing events generated in the
10
+ kernel directly to userspace through character devices that are typically
11
+ located in `/dev/input/`.
12
+
13
+ This package also comes with bindings to *uinput*, the userspace input
14
+ subsystem. *Uinput* allows userspace programs to create and handle input devices
15
+ that can inject events directly into the input subsystem.
16
+
17
+ ***Documentation:***
18
+ https://python-evdev.readthedocs.io/en/latest/
19
+
20
+ ***Development:***
21
+ https://github.com/gvalkov/python-evdev
22
+
23
+ ***Package:***
24
+ https://pypi.python.org/pypi/evdev
25
+
26
+ ***Changelog:***
27
+ https://python-evdev.readthedocs.io/en/latest/changelog.html
@@ -106,10 +106,12 @@ uinput_get_sysname(PyObject *self, PyObject *args)
106
106
  int ret = PyArg_ParseTuple(args, "i", &fd);
107
107
  if (!ret) return NULL;
108
108
 
109
+ #ifdef UI_GET_SYSNAME
109
110
  if (ioctl(fd, UI_GET_SYSNAME(sizeof(sysname)), &sysname) < 0)
110
111
  goto on_err;
111
112
 
112
113
  return Py_BuildValue("s", &sysname);
114
+ #endif
113
115
 
114
116
  on_err:
115
117
  PyErr_SetFromErrno(PyExc_OSError);
@@ -90,7 +90,10 @@ class UInput(EventIO):
90
90
  devnode="/dev/uinput",
91
91
  phys="py-evdev-uinput",
92
92
  input_props=None,
93
- max_effects=ecodes.FF_MAX_EFFECTS,
93
+ # CentOS 7 has sufficiently old headers that FF_MAX_EFFECTS is not defined there,
94
+ # which causes the whole module to fail loading. Fallback on a hardcoded value of
95
+ # FF_MAX_EFFECTS if it is not defined in the ecodes.
96
+ max_effects=ecodes.ecodes.get("FF_MAX_EFFECTS", 96),
94
97
  ):
95
98
  """
96
99
  Arguments
@@ -330,11 +333,20 @@ class UInput(EventIO):
330
333
  # It is possible that there is some delay before /dev/input/event* shows
331
334
  # up on old systems that do not use devtmpfs, so if the device cannot be
332
335
  # found, wait for a short amount and then try again once.
333
- try:
334
- return device.InputDevice(device_path)
335
- except FileNotFoundError:
336
- time.sleep(0.1)
337
- return device.InputDevice(device_path)
336
+ #
337
+ # Furthermore, even if devtmpfs is in use, it is possible that the device
338
+ # does show up immediately, but without the correct permissions that
339
+ # still need to be set by udev. Wait for up to two seconds for either the
340
+ # device to show up or the permissions to be set.
341
+ for attempt in range(19):
342
+ try:
343
+ return device.InputDevice(device_path)
344
+ except (FileNotFoundError, PermissionError):
345
+ time.sleep(0.1)
346
+
347
+ # Last attempt. If this fails, whatever exception the last attempt raises
348
+ # shall be the exception that this function raises.
349
+ return device.InputDevice(device_path)
338
350
 
339
351
  def _find_device_fallback(self):
340
352
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evdev
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Bindings to the Linux input handling subsystem
5
5
  Author-email: Georgi Valkov <georgi.t.valkov@gmail.com>
6
6
  Maintainer-email: Tobi <proxima@sezanzeb.de>
@@ -44,30 +44,33 @@ Classifier: Topic :: Software Development :: Libraries
44
44
  Classifier: License :: OSI Approved :: BSD License
45
45
  Classifier: Programming Language :: Python :: Implementation :: CPython
46
46
  Requires-Python: >=3.6
47
- Description-Content-Type: text/x-rst
47
+ Description-Content-Type: text/markdown
48
48
  License-File: LICENSE
49
49
 
50
- *evdev*
51
- -------
50
+ # evdev
52
51
 
53
- This package provides bindings to the generic input event interface in
54
- Linux. The *evdev* interface serves the purpose of passing events
55
- generated in the kernel directly to userspace through character
56
- devices that are typically located in ``/dev/input/``.
52
+ <p>
53
+ <a href="https://pypi.python.org/pypi/evdev"><img alt="pypi version" src="https://img.shields.io/pypi/v/evdev.svg"></a>
54
+ <a href="https://github.com/gvalkov/python-evdev/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/evdev"></a>
55
+ </p>
56
+
57
+ This package provides bindings to the generic input event interface in Linux.
58
+ The *evdev* interface serves the purpose of passing events generated in the
59
+ kernel directly to userspace through character devices that are typically
60
+ located in `/dev/input/`.
57
61
 
58
62
  This package also comes with bindings to *uinput*, the userspace input
59
- subsystem. *Uinput* allows userspace programs to create and handle
60
- input devices that can inject events directly into the input
61
- subsystem.
63
+ subsystem. *Uinput* allows userspace programs to create and handle input devices
64
+ that can inject events directly into the input subsystem.
62
65
 
63
- Documentation:
64
- https://python-evdev.readthedocs.io/en/latest/
66
+ ***Documentation:***
67
+ https://python-evdev.readthedocs.io/en/latest/
65
68
 
66
- Development:
67
- https://github.com/gvalkov/python-evdev
69
+ ***Development:***
70
+ https://github.com/gvalkov/python-evdev
68
71
 
69
- Package:
70
- https://pypi.python.org/pypi/evdev
72
+ ***Package:***
73
+ https://pypi.python.org/pypi/evdev
71
74
 
72
- Changelog:
73
- https://python-evdev.readthedocs.io/en/latest/changelog.html
75
+ ***Changelog:***
76
+ https://python-evdev.readthedocs.io/en/latest/changelog.html
@@ -1,6 +1,6 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
- README.rst
3
+ README.md
4
4
  pyproject.toml
5
5
  setup.py
6
6
  evdev/__init__.py
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "evdev"
7
- version = "1.7.0"
7
+ version = "1.7.1"
8
8
  description = "Bindings to the Linux input handling subsystem"
9
9
  keywords = ["evdev", "input", "uinput"]
10
- readme = "README.rst"
10
+ readme = "README.md"
11
11
  license = {file = "LICENSE"}
12
12
  requires-python = ">=3.6"
13
13
  authors = [
@@ -39,7 +39,7 @@ line-length = 120
39
39
  ignore = ["E265", "E241", "F403", "F401", "E401", "E731"]
40
40
 
41
41
  [tool.bumpversion]
42
- current_version = "1.7.0"
42
+ current_version = "1.7.1"
43
43
  commit = true
44
44
  tag = true
45
45
  allow_dirty = true
@@ -48,4 +48,4 @@ allow_dirty = true
48
48
  filename = "pyproject.toml"
49
49
 
50
50
  [[tool.bumpversion.files]]
51
- filename = "docs/conf.py"
51
+ filename = "docs/conf.py"
evdev-1.7.0/README.rst DELETED
@@ -1,24 +0,0 @@
1
- *evdev*
2
- -------
3
-
4
- This package provides bindings to the generic input event interface in
5
- Linux. The *evdev* interface serves the purpose of passing events
6
- generated in the kernel directly to userspace through character
7
- devices that are typically located in ``/dev/input/``.
8
-
9
- This package also comes with bindings to *uinput*, the userspace input
10
- subsystem. *Uinput* allows userspace programs to create and handle
11
- input devices that can inject events directly into the input
12
- subsystem.
13
-
14
- Documentation:
15
- https://python-evdev.readthedocs.io/en/latest/
16
-
17
- Development:
18
- https://github.com/gvalkov/python-evdev
19
-
20
- Package:
21
- https://pypi.python.org/pypi/evdev
22
-
23
- Changelog:
24
- https://python-evdev.readthedocs.io/en/latest/changelog.html
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes