diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2016-09-20 13:01:30 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2016-09-20 15:48:32 +0200 |
commit | 2b66563cde4f4275b04cd152d8fd798e6d64fa60 (patch) | |
tree | 3a9c3fd09518e9c3a2b17f9997ee3492da606781 /pkgs/development/interpreters | |
parent | d9cdbcc34ef342c13170e8f53d4416ffdd6f057f (diff) | |
download | nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar.gz nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar.bz2 nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar.lz nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar.xz nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.tar.zst nixlib-2b66563cde4f4275b04cd152d8fd798e6d64fa60.zip |
Python: make versions/prefixes more similar
Diffstat (limited to 'pkgs/development/interpreters')
7 files changed, 50 insertions, 31 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..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 { |