From b6654d9d6cad615835d6d60b9a8da8f41bfdcc77 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 12:55:33 -0700 Subject: python2Packages: default to dontUsePythonRecompileBytecode = true; --- pkgs/development/interpreters/python/mk-python-derivation.nix | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit 1.4.1