about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorEvgeny Egorochkin <phreedom@yandex.ru>2013-06-22 08:52:27 +0300
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-06-22 09:45:01 +0300
commit09e6ae577bcd7eb8d8e142fc473798f938cbae1c (patch)
tree65e5a69fdc019388d7842ef4650b1f766c4ef4e5 /pkgs/development/python-modules
parenta3bf1ca3b19d326ba6d7733541ec175061a44729 (diff)
downloadnixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar.gz
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar.bz2
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar.lz
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar.xz
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.tar.zst
nixlib-09e6ae577bcd7eb8d8e142fc473798f938cbae1c.zip
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.
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/generic/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
index f72fbff1806a..d32c6818bb26 100644
--- a/pkgs/development/python-modules/generic/default.nix
+++ b/pkgs/development/python-modules/generic/default.nix
@@ -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}
   '';