pipInstallHook: handle pipInstallFlags __structuredAttrs-agnostically
This commit is contained in:
@@ -1,17 +1,27 @@
|
||||
# Setup hook for pip.
|
||||
echo "Sourcing pip-install-hook"
|
||||
# shellcheck shell=bash
|
||||
|
||||
declare -a pipInstallFlags
|
||||
echo "Sourcing pip-install-hook"
|
||||
|
||||
pipInstallPhase() {
|
||||
echo "Executing pipInstallPhase"
|
||||
runHook preInstall
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mkdir -p "$out/@pythonSitePackages@"
|
||||
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"
|
||||
|
||||
local -a flagsArray=(
|
||||
--no-index
|
||||
--no-warn-script-location
|
||||
--prefix="$out"
|
||||
--no-cache
|
||||
)
|
||||
concatTo flagsArray pipInstallFlags
|
||||
|
||||
pushd dist || return 1
|
||||
@pythonInterpreter@ -m pip install ./*.whl --no-index --no-warn-script-location --prefix="$out" --no-cache $pipInstallFlags
|
||||
echoCmd 'pip install flags' "${flagsArray[@]}"
|
||||
@pythonInterpreter@ -m pip install ./*.whl "${flagsArray[@]}"
|
||||
popd || return 1
|
||||
|
||||
runHook postInstall
|
||||
|
||||
Reference in New Issue
Block a user