This commit is contained in:
Marc Beninca 2024-09-09 00:15:57 +02:00
parent afa1314d1a
commit a9e31fd740
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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
}