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.
[...]
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);
[...]
pip install .
Now your package evdev should be installed without any errors.