setuptools: cleanup expression

This commit is contained in:
Domen Kožar 2015-11-18 11:46:34 +01:00
parent f900231042
commit d0809c2925

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, wrapPython, distutils-cfg }:
{ stdenv, fetchurl, python, wrapPython }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
@ -11,23 +11,14 @@ stdenv.mkDerivation rec {
sha256 = "07avbdc26yl2a46s76fc7m4vg611g8sh39l26x9dr9byya6sb509";
};
buildInputs = [ python wrapPython distutils-cfg ];
buildPhase = "${python}/bin/${python.executable} setup.py build";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
buildInputs = [ python wrapPython ];
doCheck = false; # requires pytest
installPhase = ''
dst=$out/${python.sitePackages}
mkdir -p $dst
export PYTHONPATH="$dst:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
${python.interpreter} setup.py install --prefix=$out
wrapPythonPrograms
'';
doCheck = false; # requires pytest
checkPhase = ''
${python}/bin/${python.executable} setup.py test
'';
meta = with stdenv.lib; {