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