add python3 support to pythonPackages

This commit is contained in:
Domen Kozar
2013-07-27 20:51:54 +02:00
parent b253eb0d59
commit 5ec6cf3756
11 changed files with 91 additions and 29 deletions

View File

@@ -75,6 +75,7 @@ let
passthru = {
inherit zlibSupport;
libPrefix = "python${majorVersion}";
executable = "python2.6";
};
enableParallelBuilding = true;

View File

@@ -85,6 +85,7 @@ let
passthru = {
inherit zlibSupport;
libPrefix = "python${majorVersion}";
executable = "python2.7";
};
enableParallelBuilding = true;

View File

@@ -32,6 +32,8 @@ stdenv.mkDerivation {
sha256 = "0pxs234g08v3lar09lvzxw4vqdpwkbqmvkv894j2w7aklskcjd6v";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
preConfigure = ''
for i in /usr /sw /opt /pkg; do # improve purity
substituteInPlace ./setup.py --replace $i /no-such-path
@@ -58,7 +60,8 @@ stdenv.mkDerivation {
readlineSupport = readline != null;
opensslSupport = openssl != null;
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}m";
libPrefix = "python${majorVersion}";
executable = "python3.2m";
};
enableParallelBuilding = true;

View File

@@ -32,6 +32,8 @@ stdenv.mkDerivation {
sha256 = "16myvina7nakyyg7r5gnjyydk8bzar988vmxsw2k485w5gz04wpp";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
preConfigure = ''
for i in /usr /sw /opt /pkg; do # improve purity
substituteInPlace ./setup.py --replace $i /no-such-path
@@ -58,7 +60,8 @@ stdenv.mkDerivation {
readlineSupport = readline != null;
opensslSupport = openssl != null;
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}m";
libPrefix = "python${majorVersion}";
executable = "python3.3m";
};
enableParallelBuilding = true;

View File

@@ -1,12 +1,12 @@
addPythonPath() {
addToSearchPathWithCustomDelimiter : PYTHONPATH $1/lib/python3.2/site-packages
addToSearchPathWithCustomDelimiter : PYTHONPATH $1/lib/python3.3/site-packages
}
toPythonPath() {
local paths="$1"
local result=
for i in $paths; do
p="$i/lib/python3.2/site-packages"
p="$i/lib/python3.3/site-packages"
result="${result}${result:+:}$p"
done
echo $result