summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.6/default.nix13
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix23
-rw-r--r--pkgs/development/interpreters/python/cpython/3.3/default.nix14
-rw-r--r--pkgs/development/interpreters/python/cpython/3.4/default.nix17
-rw-r--r--pkgs/development/interpreters/python/cpython/3.5/default.nix17
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/default.nix21
-rw-r--r--pkgs/development/interpreters/python/pypy/2.7/default.nix11
7 files changed, 81 insertions, 35 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.6/default.nix b/pkgs/development/interpreters/python/cpython/2.6/default.nix
index 5311be697afe..64f2b80d09fa 100644
--- a/pkgs/development/interpreters/python/cpython/2.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.6/default.nix
@@ -8,10 +8,14 @@ with stdenv.lib;
 
 let
   majorVersion = "2.6";
-  version = "${majorVersion}.9";
+  minorVersion = "9";
+  minorVersionSuffix = "";
+  pythonVersion = majorVersion;
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0hbfs2691b60c7arbysbzr0w9528d5pl8a4x7mq5psh6a2cvprya";
   };
 
@@ -90,16 +94,19 @@ let
 
         paxmark E $out/bin/python${majorVersion}
 
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
+
         ${ optionalString includeModules "$out/bin/python ./setup.py build_ext"}
       '';
 
     passthru = rec {
+      inherit libPrefix;
       inherit zlibSupport;
       isPy2 = true;
       isPy26 = true;
       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";
       interpreter = "${self}/bin/${executable}";
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index 5f15db26ebc3..4c28e977b495 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, self, callPackage, python27Packages
+{ stdenv, fetchurl, fetchpatch, self, callPackage, python27Packages
 , bzip2, openssl, gettext
 
 , includeModules ? false
@@ -22,10 +22,14 @@ with stdenv.lib;
 
 let
   majorVersion = "2.7";
-  version = "${majorVersion}.12";
+  minorVersion = "12";
+  minorVersionSuffix = "";
+  pythonVersion = majorVersion;
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp";
   };
 
@@ -44,6 +48,14 @@ let
       ./deterministic-build.patch
 
       ./properly-detect-curses.patch
+
+      # FIXME: get rid of this after the next release, when the commit referenced here makes
+      # it in. We need it until then because it breaks compilation of programs that use
+      # locale with clang 3.8 and higher.
+      (fetchpatch {
+        url    = "https://hg.python.org/cpython/raw-rev/e0ec3471cb09";
+        sha256 = "1jdgb70jw942r4kmr01qll7mk1di8jx0qiabmp20jhnmha246ivq";
+      })
     ] ++ optionals stdenv.isLinux [
 
       # Disable the use of ldconfig in ctypes.util.find_library (since
@@ -150,18 +162,21 @@ let
 
         paxmark E $out/bin/python${majorVersion}
 
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
+
         ${optionalString includeModules "$out/bin/python ./setup.py build_ext"}
 
         rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev
       '';
 
     passthru = rec {
+      inherit libPrefix;
       inherit zlibSupport;
       isPy2 = true;
       isPy27 = true;
       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";
       interpreter = "${self}/bin/${executable}";
diff --git a/pkgs/development/interpreters/python/cpython/3.3/default.nix b/pkgs/development/interpreters/python/cpython/3.3/default.nix
index cb48186a69e7..3be1209b636e 100644
--- a/pkgs/development/interpreters/python/cpython/3.3/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.3/default.nix
@@ -21,8 +21,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.3";
+  minorVersion = "6";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.6";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib bzip2 lzma gdbm sqlite db readline ncurses openssl tcl tk libX11 xproto
@@ -37,7 +40,7 @@ stdenv.mkDerivation {
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0gsxpgd5p4mwd01gw501vsyahncyw3h9836ypkr3y32kgazy89jj";
   };
 
@@ -71,17 +74,20 @@ stdenv.mkDerivation {
     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}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python3.3m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix
index 2e7d3a03141e..78f5972e10fb 100644
--- a/pkgs/development/interpreters/python/cpython/3.4/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix
@@ -23,9 +23,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.4";
+  minorVersion = "5";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.5";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib
@@ -45,14 +47,14 @@ let
 
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
+    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
     sha256 = "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f";
   };
 
@@ -95,17 +97,20 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python3.4m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix
index 69d3df32a326..84488e7e05c3 100644
--- a/pkgs/development/interpreters/python/cpython/3.5/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix
@@ -22,9 +22,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.5";
+  minorVersion = "2";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.2";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib
@@ -42,14 +44,14 @@ let
   ] ++ optionals stdenv.isDarwin [ CF configd ];
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400";
   };
 
@@ -92,6 +94,9 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   postFixup = ''
@@ -106,14 +111,14 @@ stdenv.mkDerivation {
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = false;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python${majorVersion}m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix
index 3a6635cd8b62..3f25640afeaa 100644
--- a/pkgs/development/interpreters/python/cpython/3.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix
@@ -24,9 +24,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.6";
+  minorVersion = "0";
+  minorVersionSuffix = "b1";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.0a3";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     glibc
@@ -46,15 +48,15 @@ let
   ] ++ optionals stdenv.isDarwin [ CF configd ];
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "https://www.python.org/ftp/python/${majorVersion}.0/Python-${fullVersion}.tar.xz";
-    sha256 = "08c3598bwihibwca9lwxq923sjq9shvgv3wxv4vkga2n6hf63l1c";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
+    sha256 = "0hjdlwkjanjagz4qggbfgal8ggmas26mx2jlgjx1z2mzi950jfx8";
   };
 
   NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
@@ -73,8 +75,6 @@ stdenv.mkDerivation {
        export MACOSX_DEPLOYMENT_TARGET=10.6
      ''}
 
-    substituteInPlace ./Lib/plat-generic/regen --replace "/usr/include" ${glibc.dev}/include
-
     configureFlagsArray=( --enable-shared --with-threads
                           CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
                           LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
@@ -98,17 +98,20 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python${majorVersion}m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/pypy/2.7/default.nix b/pkgs/development/interpreters/python/pypy/2.7/default.nix
index c0bd10a0d437..7e11ac89b167 100644
--- a/pkgs/development/interpreters/python/pypy/2.7/default.nix
+++ b/pkgs/development/interpreters/python/pypy/2.7/default.nix
@@ -5,9 +5,11 @@
 assert zlibSupport -> zlib != null;
 
 let
-
-  majorVersion = "5.4.1";
-  version = "${majorVersion}";
+  majorVersion = "5.4";
+  minorVersion = "1";
+  minorVersionSuffix = "";
+  pythonVersion = "2.7";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
   libPrefix = "pypy${majorVersion}";
 
   pypy = stdenv.mkDerivation rec {
@@ -113,6 +115,9 @@ let
 
        # verify cffi modules
        $out/bin/pypy -c "import Tkinter;import sqlite3;import curses"
+
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
     '';
 
     passthru = rec {