nixpkgs/pkgs/development/python-modules/setuptools/default.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, python, wrapPython, distutils-cfg }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
2013-07-27 22:51:54 +04:00
name = "${python.executable}-${shortName}";
version = "18.2"; # 18.4 breaks python34Packages.characteristic and many others
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz";
sha256 = "07avbdc26yl2a46s76fc7m4vg611g8sh39l26x9dr9byya6sb509";
};
buildInputs = [ python wrapPython distutils-cfg ];
buildPhase = "${python}/bin/${python.executable} setup.py build";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
2015-07-15 20:40:56 +03:00
export PYTHONPATH="$dst:$PYTHONPATH"
2014-03-07 17:33:59 +04:00
${python}/bin/${python.executable} setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
wrapPythonPrograms
'';
2014-09-18 16:03:16 +04:00
doCheck = false; # requires pytest
2013-07-27 22:51:54 +04:00
checkPhase = ''
${python}/bin/${python.executable} setup.py test
'';
meta = with stdenv.lib; {
description = "Utilities to facilitate the installation of Python packages";
homepage = http://pypi.python.org/pypi/setuptools;
2014-01-24 19:27:36 +04:00
license = [ "PSF" "ZPL" ];
platforms = platforms.all;
};
}