3
0
Fork 0
forked from mirrors/nixpkgs

Restoring builderDefs functionality in setuptools

svn path=/nixpkgs/trunk/; revision=15697
This commit is contained in:
Michael Raskin 2009-05-24 12:20:08 +00:00
parent ed69e9ed94
commit f4e6e80bcf
2 changed files with 26 additions and 11 deletions

View file

@ -1,21 +1,34 @@
{ fetchurl, stdenv, python, makeWrapper }:
a :
let
fetchurl = a.fetchurl;
stdenv.mkDerivation rec {
name = "setuptools-0.6c9";
version = a.lib.getAttr ["version"] "0.6c9" a;
buildInputs = with a; [
python makeWrapper
];
in
rec {
name = "setuptools-" + version;
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
sha256 = "1n5k6hf9nn69fnprgsnr9hdxzj2j6ir76qcy9d4b2v0v62bh86g6";
};
buildInputs = [ python makeWrapper ];
inherit buildInputs;
configureFlags = [];
doCheck = true;
buildPhase = "python setup.py build --build-base $out";
checkPhase = "python setup.py test";
doMakeCheck = a.fullDepEntry (''
python setup.py test
'') ["minInit" "doUnpack" "addInputs" "doBuild"];
installPhase = ''
doBuild = a.fullDepEntry(''
python setup.py build --build-base $out
'') ["addInputs" "doUnpack"];
doInstall = a.fullDepEntry(''
ensureDir "$out/lib/python2.5/site-packages"
PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \
@ -27,11 +40,13 @@ stdenv.mkDerivation rec {
--prefix PYTHONPATH ":" \
"$out/lib/python2.5/site-packages"
done
'';
'') ["doBuild"];
phaseNames = ["doBuild" "doInstall"];
meta = {
description = "Utilities to facilitate the installation of Python packages";
homepage = http://pypi.python.org/pypi/setuptools;
licenses = [ "PSF" "ZPL" ];
};
};
}

View file

@ -4316,8 +4316,8 @@ let
inherit fetchurl stdenv python makeWrapper;
};
setuptools = import ../development/python-modules/setuptools {
inherit fetchurl stdenv python makeWrapper;
setuptools = builderDefsPackage (import ../development/python-modules/setuptools) {
inherit python makeWrapper;
};
simplejson = import ../development/python-modules/simplejson {