You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently running maturin build does not have reproducible wheel output even if the input files have not changed. This can be observed by doing the following:
Running maturin build
Record the md5sum of the output wheel
Running the same maturin build command again without changing any of the python or rust files
Observe the md5sum of the output wheel is different
I noticed in my case it's because the mtime timestamp of the files in the wheel have been updated.
1334: Support SOURCE_DATE_EPOCH environment variable in wheel building r=messense a=zmanji
This adds support for the `SOURCE_DATE_EPOCH` environment variable like wheel does when building wheels. If this environment variable is set, the `mtime` of the files in the wheel are set to this value to ensure reproducible output.
Fixes#1320
Co-authored-by: Zameer Manji <zmanji@gmail.com>
This adds support for the `SOURCE_DATE_EPOCH` environment variable like wheel
does when building wheels. If this environment variable is set, the `mtime` of
the files in the wheel are set to this value to ensure reproducible output.
FixesPyO3#1320
Currently running
maturin build
does not have reproducible wheel output even if the input files have not changed. This can be observed by doing the following:maturin build
maturin build
command again without changing any of the python or rust filesI noticed in my case it's because the
mtime
timestamp of the files in the wheel have been updated.It would be great if
maturin
respected theSOURCE_DATE_EPOCH
environment variable like wheel already does:https://github.com/pypa/wheel/blob/70d8f7f5189fac0dfbf21b83adbd2781d2537c17/src/wheel/wheelfile.py#L26-L31
If this environment variable is set, it would be used to set the mtime of the files in the wheel, making the output reproducible.
Having reproducibility is really handy for me because a build system may skip tasks if the wheel is the same.
I think the change would be as simple as adjusting
maturin/src/module_writer.rs
Lines 237 to 241 in 6e7b02f
The text was updated successfully, but these errors were encountered: