forked from mirrors/nixpkgs
61a04f735a
Reproducible builds of pyproject projects using pip is resolved. Fixes https://github.com/pypa/pip/issues/7808 Fixes https://github.com/NixOS/nixpkgs/issues/81441 The more recentc409f69480
caused trouble with pyproject troubles and had to be reverted anyway. https://github.com/NixOS/nixpkgs/pull/102222#issuecomment-722380794 Revert "pythonPackages.pip: make reproducible (#102222)" This reverts commitc409f69480
. Revert "python3Packages.pip: allow setting reproducible temporary directory via NIX_PIP_INSTALL_TMPDIR" This reverts commitaedbade43e
.
25 lines
648 B
Bash
25 lines
648 B
Bash
# Setup hook for pip.
|
|
echo "Sourcing pip-install-hook"
|
|
|
|
declare -a pipInstallFlags
|
|
|
|
pipInstallPhase() {
|
|
echo "Executing pipInstallPhase"
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out/@pythonSitePackages@"
|
|
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"
|
|
|
|
pushd dist || return 1
|
|
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild
|
|
popd || return 1
|
|
|
|
runHook postInstall
|
|
echo "Finished executing pipInstallPhase"
|
|
}
|
|
|
|
if [ -z "${dontUsePipInstall-}" ] && [ -z "${installPhase-}" ]; then
|
|
echo "Using pipInstallPhase"
|
|
installPhase=pipInstallPhase
|
|
fi
|