* 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:
parent
cd8a033c15
commit
15c96da276
@ -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
|
||||
";
|
||||
}
|
||||
|
18
pkgs/development/interpreters/python/setup-hook.sh
Normal file
18
pkgs/development/interpreters/python/setup-hook.sh
Normal 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)
|
Loading…
Reference in New Issue
Block a user