summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/mk-python-derivation.nix
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-06-16 12:55:33 -0700
committerJonathan Ringer <jonringer117@gmail.com>2020-06-16 13:02:50 -0700
commitb6654d9d6cad615835d6d60b9a8da8f41bfdcc77 (patch)
treefe8173547796b2a07d0708be49818b68796a714a /pkgs/development/interpreters/python/mk-python-derivation.nix
parent5815ecae38e7e1466639f6187dc7da03e64f2b7f (diff)
downloadnixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar.gz
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar.bz2
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar.lz
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar.xz
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.tar.zst
nixpkgs-b6654d9d6cad615835d6d60b9a8da8f41bfdcc77.zip
python2Packages: default to dontUsePythonRecompileBytecode = true;
Diffstat (limited to 'pkgs/development/interpreters/python/mk-python-derivation.nix')
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index 41efddbb3e0..59510252409 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -165,6 +165,11 @@ let
   # Python packages built through cross-compilation are always for the host platform.
   disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
 
+  # many packages that support python2, may include code
+  # which python2 is not able to compile
+  # mkDerivation hash will not change when passed null attrs
+  dontUsePythonRecompileBytecode = attrs.dontUsePythonRecompileBytecode or (if python.isPy27 then true else null);
+
   meta = {
     # default to python's platforms
     platforms = python.meta.platforms;