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

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