<div dir="ltr">Hi,<div><br></div><div>I'm attempting to make the builds of the Python interpreters for Nixpkgs [1] deterministic. </div><div><br></div><div>In the case of Python 2.7 we have a patch [2] 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 [3]. Do you have any idea what is going on in these files that could make them indeterministic?</div><div><br></div><div>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 [4]. Any suggestions what could be fixed here?</div><div><br></div><div>Kind regards,</div><div><br></div><div>Freddy</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/NixOS/nixpkgs">https://github.com/NixOS/nixpkgs</a></div><div>[2] <a href="https://github.com/NixOS/nixpkgs/blob/1da6775/pkgs/development/interpreters/python/cpython/2.7/deterministic-build.patch">https://github.com/NixOS/nixpkgs/blob/1da6775/pkgs/development/interpreters/python/cpython/2.7/deterministic-build.patch</a></div><div>[3] <a href="https://github.com/NixOS/nixpkgs/issues/22570#issuecomment-278474082">https://github.com/NixOS/nixpkgs/issues/22570#issuecomment-278474082</a></div><div>[4] <a href="https://gist.github.com/anonymous/7cc147af6511dee2dc5a5b8d110f0e6b">https://gist.github.com/anonymous/7cc147af6511dee2dc5a5b8d110f0e6b</a></div></div>