2009-05-24 14:20:08 +02:00
|
|
|
a :
|
|
|
|
let
|
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2009-12-25 15:17:57 +01:00
|
|
|
version = a.lib.attrByPath ["version"] "0.6c11" a;
|
2009-05-24 14:20:08 +02:00
|
|
|
buildInputs = with a; [
|
|
|
|
python makeWrapper
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
name = "setuptools-" + version;
|
2009-05-24 00:54:11 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
|
2009-12-25 15:17:57 +01:00
|
|
|
sha256 = "1lx1hwxkhipyh206bgl90ddnfcnb68bzcvyawczbf833fadyl3v3";
|
2009-05-24 00:54:11 +02:00
|
|
|
};
|
|
|
|
|
2009-05-24 14:20:08 +02:00
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
2009-05-24 00:54:11 +02:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2009-05-24 14:20:08 +02:00
|
|
|
doMakeCheck = a.fullDepEntry (''
|
|
|
|
python setup.py test
|
|
|
|
'') ["minInit" "doUnpack" "addInputs" "doBuild"];
|
|
|
|
|
|
|
|
doBuild = a.fullDepEntry(''
|
|
|
|
python setup.py build --build-base $out
|
|
|
|
'') ["addInputs" "doUnpack"];
|
2009-05-24 00:54:11 +02:00
|
|
|
|
2009-05-24 14:20:08 +02:00
|
|
|
doInstall = a.fullDepEntry(''
|
2010-01-07 23:47:30 +01:00
|
|
|
ensureDir "$out/lib/${a.python.libPrefix}/site-packages"
|
2009-05-24 00:54:11 +02:00
|
|
|
|
2010-01-07 23:47:30 +01:00
|
|
|
PYTHONPATH="$out/lib/${a.python.libPrefix}/site-packages:$PYTHONPATH" \
|
2009-05-24 00:54:11 +02:00
|
|
|
python setup.py install --prefix="$out"
|
|
|
|
|
|
|
|
for i in "$out/bin/"*
|
|
|
|
do
|
|
|
|
wrapProgram "$i" \
|
|
|
|
--prefix PYTHONPATH ":" \
|
2010-01-07 23:47:30 +01:00
|
|
|
"$out/lib/${a.python.libPrefix}/site-packages"
|
2009-05-24 00:54:11 +02:00
|
|
|
done
|
2009-05-24 14:20:08 +02:00
|
|
|
'') ["doBuild"];
|
|
|
|
|
|
|
|
phaseNames = ["doBuild" "doInstall"];
|
2009-05-24 00:54:11 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Utilities to facilitate the installation of Python packages";
|
|
|
|
homepage = http://pypi.python.org/pypi/setuptools;
|
|
|
|
licenses = [ "PSF" "ZPL" ];
|
2009-05-24 14:20:08 +02:00
|
|
|
};
|
2009-05-24 00:54:11 +02:00
|
|
|
}
|