nixpkgs/pkgs/development/python-modules/setuptools/default.nix
Frederik Rietdijk def310df45 pythonPackages.setuptools: fix for use in buildEnv
pythonPath needs to be set for it to be included in buildEnv.
This will also fix tox.
2016-07-02 23:44:10 +02:00

33 lines
977 B
Nix

{ stdenv, lib, fetchurl, python, wrapPython }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
name = "${python.executable}-${shortName}";
version = "19.4"; # 18.4 and up breaks python34Packages.characteristic and many others
src = fetchurl {
url = "mirror://pypi/s/setuptools/${shortName}.tar.gz";
sha256 = "214bf29933f47cf25e6faa569f710731728a07a19cae91ea64f826051f68a8cf";
};
buildInputs = [ python wrapPython ];
doCheck = false; # requires pytest
installPhase = ''
dst=$out/${python.sitePackages}
mkdir -p $dst
export PYTHONPATH="$dst:$PYTHONPATH"
${python.interpreter} setup.py install --prefix=$out
wrapPythonPrograms
'';
pythonPath = [];
meta = with stdenv.lib; {
description = "Utilities to facilitate the installation of Python packages";
homepage = http://pypi.python.org/pypi/setuptools;
license = with lib.licenses; [ psfl zpt20 ];
platforms = platforms.all;
};
}