From 7b9d3f860588c5157ec9cb2a325e9e16a2ab6e17 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Mon, 12 Sep 2016 01:46:17 -0400 Subject: stdenv-darwin: upgrade a few more things It's a long build and generally painful to split into smaller commits, so I apologize for lumping many changes into one commit but this is far easier. There are still several outdated parts of the darwin stdenv but these changes should bring us closer to the goal. Fixes #18461 --- pkgs/development/interpreters/python/cpython/2.7/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 5f15db26ebc3..5c61b9777c85 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 @@ -44,6 +44,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 -- cgit 1.4.1 From 2b66563cde4f4275b04cd152d8fd798e6d64fa60 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 20 Sep 2016 13:01:30 +0200 Subject: Python: make versions/prefixes more similar --- .../interpreters/python/cpython/2.6/default.nix | 10 +++++++--- .../interpreters/python/cpython/2.7/default.nix | 10 +++++++--- .../interpreters/python/cpython/3.3/default.nix | 11 +++++++---- .../interpreters/python/cpython/3.4/default.nix | 14 ++++++++------ .../interpreters/python/cpython/3.5/default.nix | 14 ++++++++------ .../interpreters/python/cpython/3.6/default.nix | 14 ++++++++------ pkgs/development/interpreters/python/pypy/2.7/default.nix | 8 +++++--- 7 files changed, 50 insertions(+), 31 deletions(-) (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/python/cpython/2.6/default.nix b/pkgs/development/interpreters/python/cpython/2.6/default.nix index 5311be697afe..2d81773aeb06 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"; }; @@ -94,12 +98,12 @@ let ''; 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 5c61b9777c85..77c6a3f06ce7 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -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"; }; @@ -164,12 +168,12 @@ let ''; 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..0981604f66ec 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"; }; @@ -74,14 +77,14 @@ stdenv.mkDerivation { ''; 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..70d80b9bb8d3 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"; }; @@ -98,14 +100,14 @@ stdenv.mkDerivation { ''; 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..8cb7ac9d0787 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"; }; @@ -106,14 +108,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..7361a6b7cdde 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 = "a3"; pythonVersion = majorVersion; - version = "${majorVersion}.0a3"; - fullVersion = "${version}"; + version = "${majorVersion}.${minorVersion}${minorVersionSuffix}"; + libPrefix = "python${majorVersion}"; buildInputs = filter (p: p != null) [ glibc @@ -46,14 +48,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 = "https://www.python.org/ftp/python/${majorVersion}.0/Python-${fullVersion}.tar.xz"; + url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz"; sha256 = "08c3598bwihibwca9lwxq923sjq9shvgv3wxv4vkga2n6hf63l1c"; }; @@ -101,14 +103,14 @@ stdenv.mkDerivation { ''; 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..0d9d619e48a8 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 { -- cgit 1.4.1 From 63ec0068a747d11570acc1a81d984eebe5259fc1 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 20 Sep 2016 13:16:26 +0200 Subject: Python on Nix is not manylinux1 compatible Fixes https://github.com/NixOS/nixpkgs/issues/18484 --- pkgs/development/interpreters/python/cpython/2.6/default.nix | 3 +++ pkgs/development/interpreters/python/cpython/2.7/default.nix | 3 +++ pkgs/development/interpreters/python/cpython/3.3/default.nix | 3 +++ pkgs/development/interpreters/python/cpython/3.4/default.nix | 3 +++ pkgs/development/interpreters/python/cpython/3.5/default.nix | 3 +++ pkgs/development/interpreters/python/cpython/3.6/default.nix | 3 +++ pkgs/development/interpreters/python/pypy/2.7/default.nix | 3 +++ 7 files changed, 21 insertions(+) (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/python/cpython/2.6/default.nix b/pkgs/development/interpreters/python/cpython/2.6/default.nix index 2d81773aeb06..64f2b80d09fa 100644 --- a/pkgs/development/interpreters/python/cpython/2.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.6/default.nix @@ -94,6 +94,9 @@ 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"} ''; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 77c6a3f06ce7..4c28e977b495 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -162,6 +162,9 @@ 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 diff --git a/pkgs/development/interpreters/python/cpython/3.3/default.nix b/pkgs/development/interpreters/python/cpython/3.3/default.nix index 0981604f66ec..3be1209b636e 100644 --- a/pkgs/development/interpreters/python/cpython/3.3/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.3/default.nix @@ -74,6 +74,9 @@ 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 { diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix index 70d80b9bb8d3..78f5972e10fb 100644 --- a/pkgs/development/interpreters/python/cpython/3.4/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix @@ -97,6 +97,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 ''; passthru = rec { diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 8cb7ac9d0787..84488e7e05c3 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -94,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 = '' diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 7361a6b7cdde..ef330a05f955 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -100,6 +100,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 ''; passthru = rec { diff --git a/pkgs/development/interpreters/python/pypy/2.7/default.nix b/pkgs/development/interpreters/python/pypy/2.7/default.nix index 0d9d619e48a8..7e11ac89b167 100644 --- a/pkgs/development/interpreters/python/pypy/2.7/default.nix +++ b/pkgs/development/interpreters/python/pypy/2.7/default.nix @@ -115,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 { -- cgit 1.4.1 From 8c30f3d962e201f77a17c0168102b3af81eb67bf Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 20 Sep 2016 13:35:49 +0200 Subject: python3.6: 3.6.0a3 -> 3.6.0b1 /Lib/plat* has been removed in this release. http://bugs.python.org/issue28027 --- pkgs/development/interpreters/python/cpython/3.6/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index ef330a05f955..3f25640afeaa 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -25,7 +25,7 @@ with stdenv.lib; let majorVersion = "3.6"; minorVersion = "0"; - minorVersionSuffix = "a3"; + minorVersionSuffix = "b1"; pythonVersion = majorVersion; version = "${majorVersion}.${minorVersion}${minorVersionSuffix}"; libPrefix = "python${majorVersion}"; @@ -56,7 +56,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz"; - sha256 = "08c3598bwihibwca9lwxq923sjq9shvgv3wxv4vkga2n6hf63l1c"; + sha256 = "0hjdlwkjanjagz4qggbfgal8ggmas26mx2jlgjx1z2mzi950jfx8"; }; NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s"; @@ -75,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)}" -- cgit 1.4.1