Python: make versions/prefixes more similar

This commit is contained in:
Frederik Rietdijk 2016-09-20 13:01:30 +02:00
parent d9cdbcc34e
commit 2b66563cde
7 changed files with 50 additions and 31 deletions

View File

@ -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}";

View File

@ -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}";

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {