Comment 3 for bug 1882535

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Made a diff between the two .pyc files generated at different invocations. By the looks of it there is somehow a tmp path included into the .pyc file:

/tmp/pip-unpacked-wheel-w3yhi95n/setuptools/command/bdist_egg.py
vs
/tmp/pip-unpacked-wheel-uj8jixvx/setuptools/command/bdist_egg.py

root@ftest:~# diff -a 1-bdist_egg.cpython-38.pyc 2-bdist_egg.cpython-38.pyc
9c9
< EntryPoint)�Library)�Command�SetuptoolsDeprecationWarning)get_path�get_python_versioncCtd�S)N�purelib)r�rr�@/tmp/pip-unpacked-wheel-w3yhi95n/setuptools/command/bdist_egg.py�
         _get_purelibr)�get_python_librcCtd�S)NF)rrrrrr scCs2d|krtj�|�d}|�d�r.|dd�}|S)N�.r�modulei����)�os�pathsplitextendswith)filenamerrr�
                                                                                                                                            strip_module$s
---
> EntryPoint)�Library)�Command�SetuptoolsDeprecationWarning)get_path�get_python_versioncCtd�S)N�purelib)r�rr�@/tmp/pip-unpacked-wheel-uj8jixvx/setuptools/command/bdist_egg.py�
         _get_purelibr)�get_python_librcCtd�S)NF)rrrrrr scCs2d|krtj�|�d}|�d�r.|dd�}|S)N�.r�modulei����)�os�pathsplitextendswith)filenamerrr�
                                                                                                                                            strip_module$s

That's what causes the .pyc file hashes to be different while the sources are the same. The sources themselves definitely don't include the tmp path.

(Pdb) '/tmp/pip-unpacked-wheel-' in str(source_bytes)
False