summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/3.2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/python/3.2/default.nix')
-rw-r--r--pkgs/development/interpreters/python/3.2/default.nix29
1 files changed, 19 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/python/3.2/default.nix b/pkgs/development/interpreters/python/3.2/default.nix
index 489d0509c1a..2645b503344 100644
--- a/pkgs/development/interpreters/python/3.2/default.nix
+++ b/pkgs/development/interpreters/python/3.2/default.nix
@@ -9,6 +9,8 @@
 , sqlite
 , tcl, tk
 , zlib
+, callPackage
+, self
 }:
 
 assert readline != null -> ncurses != null;
@@ -17,7 +19,7 @@ with stdenv.lib;
 
 let
   majorVersion = "3.2";
-  version = "${majorVersion}.5";
+  version = "${majorVersion}.6";
 
   buildInputs = filter (p: p != null) [
     zlib bzip2 gdbm sqlite db readline ncurses openssl tcl tk libX11 xproto
@@ -25,19 +27,14 @@ let
 in
 stdenv.mkDerivation {
   name = "python3-${version}";
+  pythonVersion = majorVersion;
   inherit majorVersion version;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.bz2";
-    sha256 = "0pxs234g08v3lar09lvzxw4vqdpwkbqmvkv894j2w7aklskcjd6v";
+    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    sha256 = "1p3vvvh3qw8avq959hdl6bq5d6r7mbhrnigqzgx6mllzh40va4hx";
   };
 
-  patches =
-    [
-      # See http://bugs.python.org/issue20246
-      ./CVE-2014-1912.patch
-    ];
-
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
 
   preConfigure = ''
@@ -56,14 +53,25 @@ stdenv.mkDerivation {
   setupHook = ./setup-hook.sh;
 
   postInstall = ''
-    rm -rf "$out/lib/python${majorVersion}/test"
+    # needed for some packages, especially packages that backport functionality
+    # to 2.x from 3.x
+    for item in $out/lib/python${majorVersion}/test/*; do
+      if [[ "$item" != */test_support.py* ]]; then
+        rm -rf "$item"
+      else
+        echo $item
+      fi
+    done
+    touch $out/lib/python${majorVersion}/test/__init__.py
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
+    paxmark E $out/bin/python${majorVersion}
   '';
 
   passthru = rec {
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
+    buildEnv = callPackage ../wrapper.nix { python = self; };
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
@@ -73,6 +81,7 @@ stdenv.mkDerivation {
     isPy32 = true;
     is_py3k = true;  # deprecated
     sitePackages = "lib/${libPrefix}/site-packages";
+    interpreter = "${self}/bin/${executable}";
   };
 
   enableParallelBuilding = true;