diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7ea81f9..40e4c18 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1028,6 +1028,27 @@ spcd_f_py_link() { fi } +spcd_f_py_save() { + spcd_step "Write module" + local variable value text index root + for variable in \ + OS_ID OS_VERSION \ + PROJECT_ROOT PROJECT_PATH PROJECT_NAME \ + PYTHON_VENV_BINARIES PYTHON_VENV_PACKAGES \ + OPEN DOWN VERT SPLT __UP SHUT; do + value="$(spcd_os_printenv "SPCD_${variable}")" + text="${text}${value} +" + done + index=$((__SPCD_STEP_1_INDEX + 1)) + for root in \ + "${SPCD_PYTHON_PACKAGES}" "${SPCD_PYTHON_VENV_PACKAGES}"; do + spcd_os_write "${root}/env.py" "${text} +SPCD_STEP = ${index} +" + done +} + # ╭───┬─────╮ # │ f │ txt │ # ╰───┴─────╯ @@ -1526,27 +1547,6 @@ spcd_step__install_packages() { spcd_step_out } -spcd_step__python_write_module() { - spcd_step "Write module" - local variable value text index root - for variable in \ - OS_ID OS_VERSION \ - PROJECT_ROOT PROJECT_PATH PROJECT_NAME \ - PYTHON_VENV_BINARIES PYTHON_VENV_PACKAGES \ - OPEN DOWN VERT SPLT __UP SHUT; do - value="$(spcd_os_printenv "SPCD_${variable}")" - text="${text}${value} -" - done - index=$((__SPCD_STEP_1_INDEX + 1)) - for root in \ - "${SPCD_PYTHON_PACKAGES}" "${SPCD_PYTHON_VENV_PACKAGES}"; do - spcd_os_write "${root}/env.py" "${text} -SPCD_STEP = ${index} -" - done -} - spcd_step__python_switch() { spcd_step "Switch" local name path @@ -1616,7 +1616,7 @@ spcd_main() { spcd_step__python_install spcd_step__python_modules spcd_step__install_packages - spcd_step__python_write_module + spcd_f_py_save spcd_step__python_switch }