From 3a58be34e025da351689961538ebcb38dc7c2dfa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 19 Aug 2024 14:15:29 +0200 Subject: [PATCH] mv --- spcd.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/spcd.sh b/spcd.sh index a48ff51..ad425f4 100644 --- a/spcd.sh +++ b/spcd.sh @@ -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() {