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