This commit is contained in:
Marc Beninca 2024-08-19 14:15:29 +02:00
parent 1e4ad2125e
commit 3a58be34e0
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

44
spcd.sh
View file

@ -605,6 +605,28 @@ spcd_install_python() {
spcd_install_package "${SPCD_PYTHON_PACKAGE}"
spcd_split
spcd_ln_python "${SPCD_PYTHON_COMMAND}"
# TODO move to Python
spcd_step "Install Python virtual environment"
case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv"
;;
"${SPCD_OS_ARCH}")
# FIXME arch
exit 255
;;
*) ;;
esac
spcd_split
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
spcd_split
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
spcd_split
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
}
spcd_install_python_modules() {
@ -704,28 +726,6 @@ spcd_install_packages() {
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
*) ;;
esac
# venv
spcd_step "Install Python virtual environment"
case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv"
;;
"${SPCD_OS_ARCH}")
# FIXME arch
exit 255
;;
*) ;;
esac
spcd_split
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
spcd_split
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
spcd_split
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
}
spcd_write_python_module() {