Python: move interpreters

Move Python interpreters (CPython, PyPy) to same folder and share
layout.
This commit is contained in:
Frederik Rietdijk 2016-07-07 14:05:05 +02:00
parent 86393cfc20
commit 1da6775775
48 changed files with 26 additions and 23 deletions

View File

@ -99,8 +99,8 @@ let
inherit zlibSupport;
isPy2 = true;
isPy26 = true;
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; };
libPrefix = "python${majorVersion}";
executable = libPrefix;
sitePackages = "lib/${libPrefix}/site-packages";

View File

@ -160,8 +160,8 @@ let
inherit zlibSupport;
isPy2 = true;
isPy27 = true;
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; };
libPrefix = "python${majorVersion}";
executable = libPrefix;
sitePackages = "lib/${libPrefix}/site-packages";

View File

@ -88,8 +88,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}";
executable = "python3.3m";
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
isPy3 = true;
isPy33 = true;
is_py3k = true; # deprecated

View File

@ -111,8 +111,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}";
executable = "python3.4m";
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
isPy3 = true;
isPy34 = true;
is_py3k = true; # deprecated

View File

@ -111,8 +111,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}";
executable = "python${majorVersion}m";
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
isPy3 = true;
isPy35 = true;
is_py3k = true; # deprecated

View File

@ -115,8 +115,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}";
executable = "python${majorVersion}m";
buildEnv = callPackage ../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
isPy3 = true;
isPy35 = true;
is_py3k = true; # deprecated

View File

@ -117,10 +117,10 @@ let
inherit zlibSupport libPrefix;
executable = "pypy";
isPypy = true;
buildEnv = callPackage ../python/wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; };
interpreter = "${self}/bin/${executable}";
sitePackages = "site-packages";
withPackages = import ../python/with-packages.nix { inherit buildEnv; pythonPackages = pypyPackages; };
withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = pypyPackages; };
};
enableParallelBuilding = true; # almost no parallelization without STM

View File

@ -5879,31 +5879,34 @@ in
python2Packages = python27Packages;
python3Packages = python35Packages;
python26 = callPackage ../development/interpreters/python/2.6 {
python26 = callPackage ../development/interpreters/python/cpython/2.6 {
db = db47;
self = python26;
};
python27 = callPackage ../development/interpreters/python/2.7 {
python27 = callPackage ../development/interpreters/python/cpython/2.7 {
self = python27;
inherit (darwin) CF configd;
};
python33 = callPackage ../development/interpreters/python/3.3 {
python33 = callPackage ../development/interpreters/python/cpython/3.3 {
self = python33;
};
python34 = hiPrio (callPackage ../development/interpreters/python/3.4 {
python34 = hiPrio (callPackage ../development/interpreters/python/cpython/3.4 {
inherit (darwin) CF configd;
self = python34;
});
python35 = hiPrio (callPackage ../development/interpreters/python/3.5 {
python35 = hiPrio (callPackage ../development/interpreters/python/cpython/3.5 {
inherit (darwin) CF configd;
self = python35;
});
python36 = callPackage ../development/interpreters/python/3.6 {
python36 = callPackage ../development/interpreters/python/cpython/3.6 {
inherit (darwin) CF configd;
self = python36;
};
pypy = callPackage ../development/interpreters/pypy {
self = pypy;
pypy = pypy27;
pypy27 = callPackage ../development/interpreters/python/pypy/2.7 {
self = pypy27;
};
pythonFull = python2Full;
@ -5919,7 +5922,7 @@ in
python2nix = callPackage ../tools/package-management/python2nix { };
pythonDocs = recurseIntoAttrs (callPackage ../development/interpreters/python/docs {});
pythonDocs = recurseIntoAttrs (callPackage ../development/interpreters/python/cpython/docs {});
pypi2nix = callPackage ../development/tools/pypi2nix { python = python35; };