python3Packages.venvShellHook: add postVenvCreation (#87850)

* python3Packages.venvShellHook: add postVenvCreation

* python: docs: add postVenvCreation explaination
This commit is contained in:
Jon
2020-05-16 00:34:11 -07:00
committed by GitHub
parent 3233d3f0e3
commit 15b3d9d277
2 changed files with 14 additions and 4 deletions

View File

@@ -4,12 +4,14 @@ venvShellHook() {
if [ -d "${venvDir}" ]; then
echo "Skipping venv creation, '${venvDir}' already exists"
source "${venvDir}/bin/activate"
else
echo "Creating new venv environment in path: '${venvDir}'"
@pythonInterpreter@ -m venv "${venvDir}"
fi
source "${venvDir}/bin/activate"
source "${venvDir}/bin/activate"
runHook postVenvCreation
fi
runHook postShellHook
echo "Finished executing venvShellHook"