summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <githubbmw@lsmod.de>2018-01-24 21:26:18 (GMT)
committerBrett Cannon <brettcannon@users.noreply.github.com>2018-01-24 21:26:18 (GMT)
commitccbe5818af20f8c12043f5c30c277a74714405e0 (patch)
tree5ca77fca24e3ec927647334dfb5e882560546039 /Misc
parent6f6eb35f9bee18f54945f09664344f2d118ed89f (diff)
downloadcpython-ccbe5818af20f8c12043f5c30c277a74714405e0.zip
cpython-ccbe5818af20f8c12043f5c30c277a74714405e0.tar.gz
cpython-ccbe5818af20f8c12043f5c30c277a74714405e0.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Build/2018-01-16-08-32-49.bpo-29708.YCaHEx.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2018-01-16-08-32-49.bpo-29708.YCaHEx.rst b/Misc/NEWS.d/next/Build/2018-01-16-08-32-49.bpo-29708.YCaHEx.rst
new file mode 100644
index 0000000..e52c001
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2018-01-16-08-32-49.bpo-29708.YCaHEx.rst
@@ -0,0 +1,2 @@
+If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set,
+:mod:`py_compile` will always create hash-based ``.pyc`` files.