buildPythonPackage: use a separate file to fire off setup.py

This commit is contained in:
Domen Kožar
2015-11-18 11:44:37 +01:00
parent 960274fc7c
commit f3092d6446
3 changed files with 22 additions and 11 deletions

View File

@@ -25,15 +25,19 @@ in stdenv.mkDerivation rec {
unzip -d $out/${python.sitePackages} ${wheel_source}
'';
buildInputs = [ python makeWrapper unzip ];
installPhase = ''
patchPhase = ''
mkdir -p $out/bin
# patch pip to support "pip install --prefix"
# https://github.com/pypa/pip/pull/3252
pushd $out/${python.sitePackages}/
patch -p1 < ${./pip-7.0.1-prefix.patch}
popd
'';
buildInputs = [ python makeWrapper unzip ];
installPhase = ''
# install pip binary
echo '${python.interpreter} -m pip "$@"' > $out/bin/pip