Hi, I noticed today that the in-tree versions of python-uinput no longer work on kernel 4.6.3 and possibly other recent kernel versions. They emerge fine but when imported throw a NameError: Python 3.4.4 (default, Jun 11 2016, 18:42:08) [GCC 5.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import uinput Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.4/site-packages/uinput/__init__.py", line 42, in <module> _ABS_CNT = ABS_MAX[1] + 1 NameError: name 'ABS_MAX' is not defined >>> The current git head from https://github.com/tuomasjjrasanen/python-uinput resolves this (but they haven't tagged a new release yet): Python 3.4.4 (default, Jun 11 2016, 18:42:08) [GCC 5.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import uinput >>> Appears to be resolved by this commit: https://github.com/tuomasjjrasanen/python-uinput/commit/7f9f4e317be3b31c17e1cf5e53df179e2ac4fe4e Cheers, Wes
I can confirm that this is still an issue. updating the ebuild to =python-uinput-0.11.2 was as easy as renaming the outdated one from portage.
Created attachment 475364 [details, diff] Patch to fix this problem. The problem described in this bug report is due to newer kernels defining input events in a different file than was done in the previously. The attached patch (created from https://github.com/tuomasjjrasanen/python-uinput/commit/9e22407491b0512c2ad8db7a495b9cdd7568d601) resolves this issue while maintaining backwards compatiblity with older kernels. If anyone wants to try this patch for themselves, they just need to place the attached patch file into the following directory and then re-emerge uinput: /etc/portage/patches/dev-python/python-uinput-0.10.2 Note that without this patch the uinput build will generate the following as zero length files when built using a newer kernel: /usr/lib64/python2.7/site-packages/uinput/ev.py /usr/lib64/python3.4/site-packages/uinput/ev.py
Confirming. In my case, because of this bug, I'm getting a configure error while trying to build a software : > checking python2.7 module: uinput... no > configure: error: Requires Python uinput and libsuinput Thanks for the patch.
Up. Bug is confirmed. Patch (from upstream) is attached. Issue could be fixed in an easier way by version bump-ing the ebuild to latest from upstream (0.11.2 18 sep 2016 - two years ago) and maybe even marked stable.
Mass-closing bugs for removed packages.