pycparser
pycparser copied to clipboard
A source distribution install can generates .pyc files with stale bytecode
Steps to reproduce: use --no-binary
option to force pip to use the .tar.gz distribution instead of the wheel (the problem doesn't occur when using a wheel install)
python3 -m pip install pycparser --no-binary=:all:
Then the file pycparser/__pycache__/c_ast.cpython-39.pyc
is stale and needs to be recompiled (a bad mtime header gets burnt into the pyc file).
python3 -v -c "import pycparser" |& grep "stale\|bad mtime"
# bytecode is stale for 'pycparser.c_ast'
I guess the problem is somewhere inside _build_tables.py
but I can't see what exactly.