py/install
This commit is contained in:
parent
0bb39456e2
commit
59105a0c54
1 changed files with 28 additions and 28 deletions
|
@ -1020,6 +1020,33 @@ spcd_f_py_clone() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spcd_f_py_install() {
|
||||||
|
spcd_step "Install package"
|
||||||
|
spcd_f_pm_pkg_install "${SPCD_PYTHON_PACKAGE}"
|
||||||
|
spcd_step "Link alias to command"
|
||||||
|
spcd_f_py_link "${SPCD_PYTHON_COMMAND}"
|
||||||
|
# venv
|
||||||
|
spcd_step_in "Virtual environment"
|
||||||
|
spcd_step "Install package"
|
||||||
|
case "${SPCD_OS_ID}" in
|
||||||
|
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
|
||||||
|
spcd_f_pm_pkg_install "python3-venv"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
spcd_step "Configure PIP"
|
||||||
|
spcd_os_write "/etc/pip.conf" "\
|
||||||
|
[global]
|
||||||
|
index-url = ${SPCD_URL_PYTHON}/simple
|
||||||
|
"
|
||||||
|
spcd_step "Create"
|
||||||
|
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
|
||||||
|
spcd_step "Activate"
|
||||||
|
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
|
||||||
|
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
|
||||||
|
spcd_step_out
|
||||||
|
}
|
||||||
|
|
||||||
spcd_f_py_link() {
|
spcd_f_py_link() {
|
||||||
local command="${1}"
|
local command="${1}"
|
||||||
if [ -n "${command}" ]; then
|
if [ -n "${command}" ]; then
|
||||||
|
@ -1426,33 +1453,6 @@ spcd_step__packages_install_git() {
|
||||||
# │ s │ python │
|
# │ s │ python │
|
||||||
# ╰───┴────────╯
|
# ╰───┴────────╯
|
||||||
|
|
||||||
spcd_step__python_install() {
|
|
||||||
spcd_step "Install package"
|
|
||||||
spcd_f_pm_pkg_install "${SPCD_PYTHON_PACKAGE}"
|
|
||||||
spcd_step "Link alias to command"
|
|
||||||
spcd_f_py_link "${SPCD_PYTHON_COMMAND}"
|
|
||||||
# venv
|
|
||||||
spcd_step_in "Virtual environment"
|
|
||||||
spcd_step "Install package"
|
|
||||||
case "${SPCD_OS_ID}" in
|
|
||||||
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
|
|
||||||
spcd_f_pm_pkg_install "python3-venv"
|
|
||||||
;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
spcd_step "Configure PIP"
|
|
||||||
spcd_os_write "/etc/pip.conf" "\
|
|
||||||
[global]
|
|
||||||
index-url = ${SPCD_URL_PYTHON}/simple
|
|
||||||
"
|
|
||||||
spcd_step "Create"
|
|
||||||
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
|
|
||||||
spcd_step "Activate"
|
|
||||||
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
|
|
||||||
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
|
|
||||||
spcd_step_out
|
|
||||||
}
|
|
||||||
|
|
||||||
spcd_step__python_modules() {
|
spcd_step__python_modules() {
|
||||||
spcd_step_in "Modules"
|
spcd_step_in "Modules"
|
||||||
local target path script check
|
local target path script check
|
||||||
|
@ -1614,7 +1614,7 @@ spcd_main() {
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
# python
|
# python
|
||||||
spcd_step_in "Python"
|
spcd_step_in "Python"
|
||||||
spcd_step__python_install
|
spcd_f_py_install
|
||||||
spcd_step__python_modules
|
spcd_step__python_modules
|
||||||
spcd_step__install_packages
|
spcd_step__install_packages
|
||||||
spcd_f_py_save
|
spcd_f_py_save
|
||||||
|
|
Loading…
Reference in a new issue