Add a reproducibility option for building ecodes.c
`ecodes.c` currently contains the kernel info of the build machine and the full path of the `input*.h` headers: This is not reproducible as output can change even is headers content do not. Downstream distributions might package `ecodes.c` and get non-reproducible output.
To fix this: introduce a `--reproducible` option in the build:
- in `setup.py build_ecodes` command
- in underlying `genecodes_c.py`
Note: These options are disabled by default so no change is expected in current builds.
Here is a sample of the `ecodes.c` output:
```
$ python -m build --config-setting=--build-option='build_ecodes' -n >/dev/null 2>&1; cat src/evdev/ecodes.c |grep Generated
/* Generated on Linux 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 */
/* Generated from ['/usr/include/linux/input.h', '/usr/include/linux/input-event-codes.h', '/usr/include/linux/uinput.h'] */
$ python -m build --config-setting=--build-option='build_ecodes --reproducibility' -n >/dev/null 2>&1; cat src/evdev/ecodes.c |grep Generated
/* Generated on hidden for reproducibility */
/* Generated from ['hidden for reproducibility'] */
```
合并状态:已合并 合并于 2025-05-01 关闭于 2025-05-01 2 条评论