From 7dde16535348e4e780cf56a2f089f349478901f6 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Mon, 7 Jul 2014 18:39:57 +0200 Subject: [PATCH] pythonX.Y sitePackages passthru Let python tell you the correct path for site-packages. --- pkgs/development/interpreters/python/2.6/default.nix | 5 +++-- pkgs/development/interpreters/python/2.7/default.nix | 5 +++-- pkgs/development/interpreters/python/3.2/default.nix | 3 ++- pkgs/development/interpreters/python/3.3/default.nix | 3 ++- pkgs/development/interpreters/python/3.4/default.nix | 3 ++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix index d51838af5ad5..1217403f3fde 100644 --- a/pkgs/development/interpreters/python/2.6/default.nix +++ b/pkgs/development/interpreters/python/2.6/default.nix @@ -71,10 +71,11 @@ let ln -s $out/share/man/man1/{python2.6.1,python.1} ''; - passthru = { + passthru = rec { inherit zlibSupport; libPrefix = "python${majorVersion}"; - executable = "python2.6"; + executable = libPrefix; + sitePackages = "lib/${libPrefix}/site-packages"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index 388a0c9b1346..df38299cb1ce 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -85,10 +85,11 @@ let paxmark E $out/bin/python${majorVersion} ''; - passthru = { + passthru = rec { inherit zlibSupport; libPrefix = "python${majorVersion}"; - executable = "python2.7"; + executable = libPrefix; + sitePackages = "lib/${libPrefix}/site-packages"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/3.2/default.nix b/pkgs/development/interpreters/python/3.2/default.nix index f474ae659deb..3451b218f745 100644 --- a/pkgs/development/interpreters/python/3.2/default.nix +++ b/pkgs/development/interpreters/python/3.2/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation { ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" ''; - passthru = { + passthru = rec { zlibSupport = zlib != null; sqliteSupport = sqlite != null; dbSupport = db != null; @@ -70,6 +70,7 @@ stdenv.mkDerivation { libPrefix = "python${majorVersion}"; executable = "python3.2m"; is_py3k = true; + sitePackages = "lib/${libPrefix}/site-packages"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix index 36be9e0dad63..20fc66367caf 100644 --- a/pkgs/development/interpreters/python/3.3/default.nix +++ b/pkgs/development/interpreters/python/3.3/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation { paxmark E $out/bin/python${majorVersion} ''; - passthru = { + passthru = rec { zlibSupport = zlib != null; sqliteSupport = sqlite != null; dbSupport = db != null; @@ -67,6 +67,7 @@ stdenv.mkDerivation { libPrefix = "python${majorVersion}"; executable = "python3.3m"; is_py3k = true; + sitePackages = "lib/${libPrefix}/site-packages"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/3.4/default.nix b/pkgs/development/interpreters/python/3.4/default.nix index 2ce4413a2c09..a468807dcbda 100644 --- a/pkgs/development/interpreters/python/3.4/default.nix +++ b/pkgs/development/interpreters/python/3.4/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { paxmark E $out/bin/python${majorVersion} ''; - passthru = { + passthru = rec { zlibSupport = zlib != null; sqliteSupport = sqlite != null; dbSupport = db != null; @@ -68,6 +68,7 @@ stdenv.mkDerivation { libPrefix = "python${majorVersion}"; executable = "python3.4m"; is_py3k = true; + sitePackages = "lib/${libPrefix}/site-packages"; }; enableParallelBuilding = true;