[Python-Dev] Deterministic builds of the interpreter
songofacandy at gmail.com
Thu Feb 9 12:04:45 EST 2017
As reading , mtime is not 0.
data = bytearray(MAGIC_NUMBER)
First 4 bytes are magic.
Next 4 bytes are mtime.
│ │ │ │ -00000000: 160d 0d0a 6b2e 9c58 6c21 0000 e300 0000 ....k..Xl!......
│ │ │ │ +00000000: 160d 0d0a e631 9c58 6c21 0000 e300 0000 .....1.Xl!......
mtime is 6b2e9c58 vs e6319c53 (little endian)
maybe, you failed to use customized py_compile when building?
On Thu, Feb 9, 2017 at 6:27 PM, Freddy Rietdijk <freddyrietdijk at fridh.nl> wrote:
> I'm attempting to make the builds of the Python interpreters for Nixpkgs 
> In the case of Python 2.7 we have a patch  that fixes the timestamp used
> in .pyc files in case the env var `DETERMINISTIC_BUILD` is set. We also
> remove `wininst*.exe`. This works fine, although there are 4 small issues
> left . Do you have any idea what is going on in these files that could
> make them indeterministic?
> For Python 3.x I disabled ensurepip, removed `wininst*.exe`, and modified
> `py_compile` to use `0` instead of `source_stats['mtime']`. The builds are
> not yet deterministic . Any suggestions what could be fixed here?
> Kind regards,
>  https://github.com/NixOS/nixpkgs
>  https://github.com/NixOS/nixpkgs/issues/22570#issuecomment-278474082
>  https://gist.github.com/anonymous/7cc147af6511dee2dc5a5b8d110f0e6b
> Python-Dev mailing list
> Python-Dev at python.org
More information about the Python-Dev