]> granicus.if.org Git - python/commit
bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)
authorBernhard M. Wiedemann <githubbmw@lsmod.de>
Wed, 24 Jan 2018 21:26:18 +0000 (22:26 +0100)
committerBrett Cannon <brettcannon@users.noreply.github.com>
Wed, 24 Jan 2018 21:26:18 +0000 (13:26 -0800)
commitccbe5818af20f8c12043f5c30c277a74714405e0
tree5ca77fca24e3ec927647334dfb5e882560546039
parent6f6eb35f9bee18f54945f09664344f2d118ed89f
bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)

To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.
Doc/library/py_compile.rst
Lib/py_compile.py
Lib/test/test_py_compile.py
Misc/NEWS.d/next/Build/2018-01-16-08-32-49.bpo-29708.YCaHEx.rst [new file with mode: 0644]