Compare commits

..

No commits in common. "f64ebcd0f14af1b298f7e6dbc1c24794bae1ccbb" and "d4b8d62d412f85ccc604f3ad130ff4f76498d2e3" have entirely different histories.

80
re.sh
View file

@ -2,7 +2,7 @@
root="/prj/venv"
url="http://localhost:8000"
url_pypi="${url}/pypi/os/simple"
url_pypi="${url}/pypi/simple"
activate() {
echo
@ -105,49 +105,8 @@ venvs() {
"3.11" \
"3.10"
for version in "${@}"; do
url_pypi="${url}/pypi/${version}/simple"
venv="${root}/${version}"
echo
echo "${venv}${action}"
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
;;
"init")
activate "${venv}"
pip_install "uv"
deactivate
;;
"install")
activate "${venv}"
uv_install
deactivate
;;
"link")
activate "${venv}"
for module in "rwx"; do
ln --symbolic \
"/rwx/rwx/${module}" \
"${venv}/lib/python${version}/site-packages/${module}"
done
deactivate
;;
"list")
activate "${venv}"
list_venv "${venv}"
deactivate
;;
"relate")
absolute="$(readlink -f "${venv}/bin/python")"
prevenv="$(readlink -f "${venv}")"
relative=$(echo "${absolute}" | sed "s|${prevenv}|..|")
ln --force --symbolic "${relative}" "${venv}/bin/python"
;;
*) ;;
esac
done
@ -164,13 +123,38 @@ list_venv "${os}"
pip_install --upgrade "pip"
pip_install "uv"
list_venv "${os}"
venvs create
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
deactivate
venvs init
venvs relate
venvs link
venvs install
venvs list
for version in "${@}"; do
py="${root}/${version}"
activate "${py}"
list_venv "${py}"
pip_install "uv"
list_venv "${py}"
deactivate
done
for version in "${@}"; do
py="${root}/${version}"
activate "${py}"
uv_install
for module in "rwx"; do
ln --symbolic \
"/rwx/rwx/${module}" \
"${py}/lib/python${version}/site-packages/${module}"
done
list_venv "${py}"
deactivate
done
caches list_venv