79734694

Date: 2025-08-13 20:06:01
Score: 1
Natty:
Report link

To avoid making changes in system files you can download package from PyPI. Then you are able to comment lines that causes error, and build package from file.

Steps to solve

  1. Open PyPI and download archive with package
  2. Extract folder from archive to any known place
  3. Open file src/evdev/ecodes.c
  4. Comment line 542
[...]
PyModule_AddIntMacro(m, KEY_PICKUP_PHONE);
PyModule_AddIntMacro(m, KEY_HANGUP_PHONE);
//PyModule_AddIntMacro(m, KEY_LINK_PHONE);
PyModule_AddIntMacro(m, KEY_DEL_EOL);
PyModule_AddIntMacro(m, KEY_DEL_EOS);
[...]
  1. Open terminal and activate your venv (if you are using it)
  2. Go to folder with given package and write
pip install .
  1. If there are more problematic lines in ecodes.c files, comment them like in step 4

Now your package evdev should be installed without any errors.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ThePPK