| 1 |
Reproducible builds |
| 2 |
=================== |
| 3 |
|
| 4 |
.. versionadded:: 0.8 |
| 5 |
|
| 6 |
Wheels built by flit are reproducible: if you build from the same source code, |
| 7 |
you should be able to make wheels that are exactly identical, byte for byte. |
| 8 |
This is useful for verifying software. For more details, see |
| 9 |
`reproducible-builds.org <https://reproducible-builds.org/>`__. |
| 10 |
|
| 11 |
There is a caveat, however: wheels (which are zip files) include the |
| 12 |
modification timestamp from each file. This will |
| 13 |
probably be different on each computer, because it indicates when your local |
| 14 |
copy of the file was written, not when it was changed in version control. |
| 15 |
These timestamps can be overridden by the environment variable |
| 16 |
:envvar:`SOURCE_DATE_EPOCH`. |
| 17 |
|
| 18 |
.. code-block:: shell |
| 19 |
|
| 20 |
SOURCE_DATE_EPOCH=$(date +%s) |
| 21 |
flit publish |
| 22 |
# Record the value of SOURCE_DATE_EPOCH in release notes for reproduction |
| 23 |
|
| 24 |
.. versionchanged:: 0.12 |
| 25 |
Normalising permission bits |
| 26 |
|
| 27 |
Flit normalises the permission bits of files copied into a wheel to either |
| 28 |
755 (executable) or 644. This means that a file is readable by all users |
| 29 |
and writable only by the user who owns it. |
| 30 |
|
| 31 |
The most popular version control systems only track the executable bit, |
| 32 |
so checking out the same repository on systems with different umasks |
| 33 |
(e.g. Debian and Fedora) produces files with different permissions. With Flit |
| 34 |
0.11 and earlier, this difference would produce non-identical wheels. |