This commit is contained in:
Marc Beninca 2024-08-06 19:48:08 +02:00
parent 42f2cf73c5
commit dd457b9a85
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

40
spcd.sh
View file

@ -654,26 +654,6 @@ spcd_install_packages() {
;; ;;
*) ;; *) ;;
esac esac
# python venv
spcd_step "Install Python virtual environment"
case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv"
;;
# FIXME arch
*) ;;
esac
spcd_split
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
spcd_split
spcd_ip__venv="/opt/venv"
"${SPCD_PYTHON_ALIAS}" -m "venv" "${spcd_ip__venv}"
. "${spcd_ip__venv}/bin/activate"
spcd_split
pip install --upgrade "pip"
# rsync # rsync
spcd_step "Install Rsync" spcd_step "Install Rsync"
spcd_install_package "rsync" spcd_install_package "rsync"
@ -711,6 +691,26 @@ index-url = ${SPCD_URL_PYTHON}
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;; "${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
*) ;; *) ;;
esac esac
# venv
spcd_step "Install Python virtual environment"
case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv"
;;
# FIXME arch
*) ;;
esac
spcd_split
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
spcd_split
spcd_ip__venv="/opt/venv"
"${SPCD_PYTHON_ALIAS}" -m "venv" "${spcd_ip__venv}"
. "${spcd_ip__venv}/bin/activate"
spcd_split
pip install --upgrade "pip"
} }
spcd_install_python_modules() { spcd_install_python_modules() {