Python: add DETERMINISTIC_BUILD env var. If set, python doesn't write timestamps to pyc files. Tested by

building argparse, compiling from cli, compiling using py_compile.
This commit is contained in:
Evgeny Egorochkin
2013-06-22 08:52:27 +03:00
parent a3bf1ca3b1
commit 09e6ae577b
3 changed files with 41 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ python.stdenv.mkDerivation (attrs // {
pythonPath = [ setuptools ] ++ pythonPath;
preConfigure = ''
export DETERMINISTIC_BUILD=1
PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
${preConfigure}
'';