Merge pull request #13165 from NixOS/python-wip

Python PIP fix, fixes #12190, closes #13035
This commit is contained in:
Frederik Rietdijk 2016-02-21 17:49:45 +01:00
commit 846aa6e776
2 changed files with 9 additions and 2 deletions

View File

@ -42,6 +42,9 @@
# generated binaries.
, makeWrapperArgs ? []
# Additional flags to pass to "pip install".
, installFlags ? []
, ... } @ attrs:
@ -95,7 +98,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
pushd dist
${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache
${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags}
popd
runHook postInstall

View File

@ -15067,6 +15067,10 @@ in modules // {
sha256 = "46f4bd0d8dfd51125a554568d646fe4200a3c2c6c36b9f2d06d2212148439521";
};
# pip detects that we already have bootstrapped_pip "installed", so we need
# to force it a little.
installFlags = [ "--ignore-installed" ];
buildInputs = with self; [ mock scripttest virtualenv pytest ];
};
@ -15492,7 +15496,7 @@ in modules // {
${python.executable} setup.py test
'';
installFlags = optional (versionAtLeast protobuf.version "2.6.0") "--cpp_implementation";
installFlags = optional (versionAtLeast protobuf.version "2.6.0") "--install-option='--cpp_implementation'";
doCheck = true;