From 1217bf8115edd86ef5fec288268f21289a3ae6b2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 29 Sep 2024 17:16:17 +0200 Subject: [PATCH] venvs/create --- re.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/re.sh b/re.sh index ba00941..0f483a1 100755 --- a/re.sh +++ b/re.sh @@ -107,6 +107,14 @@ venvs() { for version in "${@}"; do venv="${root}/${version}" case "${action}" in + "create") + export UV_PYTHON_INSTALL_DIR="${venv}/cpypy" + echo "→ install python ${version}" + uv_python "${venv}" "${version}" + echo "→ create venv ${version}" + uv_venv "${venv}" "${version}" + unset UV_PYTHON_INSTALL_DIR + ;; *) ;; esac done @@ -123,17 +131,7 @@ list_venv "${os}" pip_install --upgrade "pip" pip_install "uv" list_venv "${os}" - -for version in "${@}"; do - py="${root}/${version}" - export UV_PYTHON_INSTALL_DIR="${py}/cpypy" - echo "→ install python ${version}" - uv_python "${py}" "${version}" - echo "→ create venv ${version}" - uv_venv "${py}" "${version}" - unset UV_PYTHON_INSTALL_DIR -done - +venvs create deactivate for version in "${@}"; do