python substeps
All checks were successful
/ job (push) Successful in 13m28s

This commit is contained in:
Marc Beninca 2024-08-21 12:44:50 +02:00
parent 8166893506
commit 37e6767612
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

10
spcd.sh
View file

@ -669,24 +669,24 @@ spcd_install_git() {
spcd_install_python() {
spcd_step "Install Python"
spcd_install_package "${SPCD_PYTHON_PACKAGE}"
spcd_split
spcd_substep "Link alias to command"
spcd_ln_python "${SPCD_PYTHON_COMMAND}"
# venv
spcd_step "Install Python virtual environment"
spcd_substep "Install virtual environment"
case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv"
;;
*) ;;
esac
spcd_split
spcd_substep "Configure PIP"
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
spcd_split
spcd_substep "Create virtual environment"
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
spcd_split
spcd_substep "Activate virtual environment"
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
}