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