nixpkgs/pkgs/development/python-modules/setuptools/default.nix
Frederik Rietdijk 8fad3e81b0 pythonPackages.setuptools: specify priority
Both python3 and setuptools come with easy-install. For some magic
reason this hasn't caused any collisions yet, but it does with #17428.
We hereby prioritize the version that comes with setuptools.
2016-08-02 12:23:15 +02:00

34 lines
996 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;
priority = 10;
};
}