wheel: bdist_wheel is not idempotent
If I run python setup.py build bdist_wheel twice without changing any files, the resulting wheels have binary differences. This seems a bit unexpected given that other archive tools like tar are idempotent. Is there a reason for this? I tested on python 2 and 3.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (10 by maintainers)
from wheel.wheelfile (mentions #143):
for existing files, the original modification time is used (so low stability, as they are clobbered by git), and the
/RECORDentry in the archive is given the current timestamp. Alternatively, ifSOURCE_DATE_EPOCHis specified in the environment, then it will be used as the modification time for all files - so I think you could use that at the moment and have no extra dependencies.I’m wondering how relevant modification times are in the use of wheels; should the timestamps in the generated archives always be a fixed date? It sounds like the Debian folks are using
SOURCE_DATE_EPOCHin their builds (not sure if they’d prefer that over always using the same stamp). For people using git, the modification times aren’t practically meaningful.I’m inclined to make a PR for: