pycparser icon indicating copy to clipboard operation
pycparser copied to clipboard

A source distribution install can generates .pyc files with stale bytecode

Open wimglenn opened this issue 3 years ago • 0 comments

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.

wimglenn avatar Sep 29 '21 02:09 wimglenn