diff options
author | Domen Kožar <domen@dev.si> | 2014-01-10 22:04:05 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-02-20 01:19:16 +0100 |
commit | c80feaf542d437d0bc6d4461ba49643dd9eac1ae (patch) | |
tree | 04b2969306c00201c9dce35e0a3ee1d580be2cd1 /pkgs/development/python-modules | |
parent | 21ada5b105aa863a01388275d7aaf226253f9d82 (diff) | |
download | nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar.gz nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar.bz2 nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar.lz nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar.xz nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.tar.zst nixlib-c80feaf542d437d0bc6d4461ba49643dd9eac1ae.zip |
document setuptools monkeypatching and DETERMINISTIC_BUILD=1
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index fc91fcd3d8a8..c2a389a78be1 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -54,14 +54,17 @@ python.stdenv.mkDerivation (attrs // { configurePhase = attrs.configurePhase or '' runHook preConfigure - # TODO: document + # patch python interpreter to write null timestamps when compiling python files + # with following var we tell python to activate the patch so that python doesn't + # try to update them when we freeze timestamps in nix store export DETERMINISTIC_BUILD=1 - # we need to prepend following line to monkeypatch distutils commands + # prepend following line to import setuptools before distutils + # this way we make sure setuptools monkeypatches distutils commands + # this way setuptools provides extra helpers such as "python setup.py test" sed -i '0,/import distutils/s//import setuptools;import distutils/' setup.py sed -i '0,/from distutils/s//import setuptools;from distutils/' setup.py - runHook postConfigure ''; |