python: add isPy2 attribute to passthru

Some packages relied on it. For consistency, also introduce isPy3 (which
is the same as isPy3k).
This commit is contained in:
Frederik Rietdijk
2019-01-04 12:31:42 +01:00
parent 29ee864e93
commit 63bcd07888
3 changed files with 5 additions and 3 deletions

View File

@@ -27,7 +27,9 @@ with pkgs;
isPy35 = pythonVersion == "3.5";
isPy36 = pythonVersion == "3.6";
isPy37 = pythonVersion == "3.7";
isPy3k = lib.strings.substring 0 1 pythonVersion == "3";
isPy2 = lib.strings.substring 0 1 pythonVersion == "2";
isPy3 = lib.strings.substring 0 1 pythonVersion == "3";
isPy3k = isPy3;
isPyPy = interpreter == "pypy";
buildEnv = callPackage ./wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };