From 5543b5de661a787b8970ae268f9524564a24b795 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 9 Sep 2024 01:04:13 +0200 Subject: [PATCH] py/download --- spcd/bootstrap.sh | 58 ++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6477eaf..ee0a381 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1101,6 +1101,32 @@ spcd_f_py_clone() { fi } +spcd_f_py_download() { + spcd_step_in "Modules" + local target path script check + target="${SPCD_PYTHON_VENV_PACKAGES}" + spcd_step "List" + spcd_os_ls "${target}" + spcd_step "Main" + path="$(spcd_f_py_clone "${SPCD_GIT_SPCD}")" + # check matching of file and variable + spcd_step "Check" + script="${path}/bootstrap.sh" + ls -l "${script}" + check="${script}.${_SPCD_CMD_SUM}" + "${_SPCD_CMD_SUM}" "${script}" >"${check}" + printf "%s" "${SPCD}" >"${script}" + ls -l "${script}" + dos2unix "${script}" + ls -l "${script}" + "${_SPCD_CMD_SUM}" -c "${check}" || spcd_error_ci "SPCD" + spcd_step "Root" + spcd_f_py_clone "${SPCD_GIT_RWX}" + spcd_step "List" + spcd_os_ls "${target}" + spcd_step_out +} + spcd_f_py_install() { spcd_step "Install package" spcd_f_pm_pkg_install "${SPCD_PYTHON_PACKAGE}" @@ -1530,36 +1556,6 @@ spcd_step__packages_install_git() { spcd_f_pm_pkg_install "git" } -# ╭───┬────────╮ -# │ s │ python │ -# ╰───┴────────╯ - -spcd_step__python_modules() { - spcd_step_in "Modules" - local target path script check - target="${SPCD_PYTHON_VENV_PACKAGES}" - spcd_step "List" - spcd_os_ls "${target}" - spcd_step "Main" - path="$(spcd_f_py_clone "${SPCD_GIT_SPCD}")" - # check matching of file and variable - spcd_step "Check" - script="${path}/bootstrap.sh" - ls -l "${script}" - check="${script}.${_SPCD_CMD_SUM}" - "${_SPCD_CMD_SUM}" "${script}" >"${check}" - printf "%s" "${SPCD}" >"${script}" - ls -l "${script}" - dos2unix "${script}" - ls -l "${script}" - "${_SPCD_CMD_SUM}" -c "${check}" || spcd_error_ci "SPCD" - spcd_step "Root" - spcd_f_py_clone "${SPCD_GIT_RWX}" - spcd_step "List" - spcd_os_ls "${target}" - spcd_step_out -} - # ╭──────╮ # │ main │ # ╰──────╯ @@ -1615,7 +1611,7 @@ spcd_main() { # python spcd_step_in "Python" spcd_f_py_install - spcd_step__python_modules + spcd_f_py_download spcd_f_pkg spcd_f_py_save spcd_f_py_switch