Compare commits

..

No commits in common. "dev" and "main" have entirely different histories.
dev ... main

28
re.sh
View file

@ -2,7 +2,7 @@
root="/prj/venv"
url="http://localhost:8000"
url_pypi="${url}/pypi/simple"
url_pypi="${url}/pypi/os/simple"
activate() {
echo
@ -39,8 +39,7 @@ list() {
ls -a -l "${1}/${2}"
}
list_venv() {
list "${1}" "bin/python"
list "${1}" "lib/$(basename "${1}")/site-packages/rwx"
list "${1}" "bin"
}
pip_install() {
echo
@ -85,18 +84,14 @@ set \
uv_python() {
echo
export UV_PYTHON_INSTALL_MIRROR="${url}/cpypy"
export UV_PYPY_INSTALL_MIRROR="${UV_PYTHON_INSTALL_MIRROR}/pypy"
uv python install "${1}"
unset \
UV_PYPY_INSTALL_MIRROR \
UV_PYTHON_INSTALL_MIRROR
uv python install "${2}"
unset UV_PYTHON_INSTALL_MIRROR
}
uv_venv() {
echo
uv venv \
--allow-existing \
--index-url "${url_pypi}" \
--no-python-downloads \
--python "${2}" \
--relocatable \
--seed \
@ -106,12 +101,11 @@ venvs() {
local action="${1}"
local venv version
set \
"python3.13" \
"python3.12" \
"python3.11" \
"python3.10" \
"pypy3.10"
"3.12" \
"3.11" \
"3.10"
for version in "${@}"; do
url_pypi="${url}/pypi/${version}/simple"
venv="${root}/${version}"
echo
echo "${venv}${action}"
@ -119,7 +113,7 @@ venvs() {
"create")
export UV_PYTHON_INSTALL_DIR="${venv}/cpypy"
echo "→ install python ${version}"
uv_python "${version}"
uv_python "${venv}" "${version}"
echo "→ create venv ${version}"
uv_venv "${venv}" "${version}"
unset UV_PYTHON_INSTALL_DIR
@ -139,7 +133,7 @@ venvs() {
for module in "rwx"; do
ln --symbolic \
"/rwx/rwx/${module}" \
"${venv}/lib/${version}/site-packages/${module}"
"${venv}/lib/python${version}/site-packages/${module}"
done
deactivate
;;
@ -179,4 +173,4 @@ venvs link
venvs install
venvs list
caches list
caches list_venv