* Python 2.4.4.

* Added a setup hook for Python that adds Python packages in
  buildInputs to $PYTHONPATH.

svn path=/nixpkgs/trunk/; revision=7338
This commit is contained in:
Eelco Dolstra 2006-12-13 18:03:08 +00:00
parent cd8a033c15
commit 15c96da276
2 changed files with 29 additions and 3 deletions

View File

@ -3,14 +3,22 @@
assert zlibSupport -> zlib != null;
stdenv.mkDerivation {
name = "python-2.4.3";
name = "python-2.4.4";
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/Python-2.4.3.tar.bz2;
md5 = "141c683447d5e76be1d2bd4829574f02";
url = http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tar.bz2;
md5 = "0ba90c79175c017101100ebf5978e906";
};
buildInputs = [
(if zlibSupport then zlib else null)
];
inherit zlibSupport;
configureFlags = "--enable-shared";
libPrefix = "python2.4";
postInstall = "
ensureDir $out/nix-support
cp ${./setup-hook.sh} $out/nix-support/setup-hook
rm -rf $out/lib/python2.4/test
";
}

View File

@ -0,0 +1,18 @@
addPythonPath() {
local p=$1/lib/python2.4/site-packages
if test -d $p; then
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p"
fi
}
toPythonPath() {
local paths="$1"
local result=
for i in $paths; do
p="$i/lib/python2.4/site-packages"
result="${result}${result:+:}$p"
done
echo $result
}
envHooks=(${envHooks[@]} addPythonPath)