-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
It would be nice if the PyPI-hosted wheels were verifiably bit-for-bit reproducible. I've experimented with the codebase and I've identified a few changes that would be needed to make this happen. If these changes are welcome, I can prepare some pull requests.
Short-term:
- Either replace (some) calls to
uv build
with other commands (maybeuv venv
+ ... +pip wheel
), or wait for a fix to Use of random temp paths byuv build
adds nondeterminism into build environments astral-sh/uv#13096 - Deterministically normalize the
.whl
ZIP metadata (timestamps, permissions etc.) - Would also be nice: Change (some) calls to
actions/checkout
to instead usegit
commands directly. (This would facilitate verifying the reproducibility, which involves executing the GitHub actions yaml locally using a local GHA-runner, such as Nektos Act.)
Long-term:
- Move complex build logic out of GHA yaml and into more general tools. The GHA yaml would then be a thin wrapper around that logic. This would facilitate verifying build reproducibility locally, without relying on local GHA-runners like Nektos Act.
- Add CI tests comparing checksums of builds done twice in a row. This would catch reproducibility regressions.
(Note: For the moment, I have only focused on the Linux wheel builds.)
Somewhat related issue: #12764