Compare commits

...

10 commits
main ... dev

Author SHA1 Message Date
2172ff104c
3.13 2024-10-09 22:15:52 +02:00
e0059fb8c5
fix 2024-09-30 10:19:24 +02:00
295c9c67f2
lib/rwx 2024-09-30 10:16:02 +02:00
46d7b287a6
versions 2024-09-30 10:13:07 +02:00
e71fc92be5
bin/python 2024-09-30 10:09:04 +02:00
263a2db4a9
url_pypi 2024-09-30 08:41:08 +02:00
af9448da3a
merged 2024-09-30 08:33:52 +02:00
e576cf24ee
/pypy 2024-09-29 22:06:17 +02:00
925cbbdeca
pypy 2024-09-29 21:41:09 +02:00
fdc01a98b6
no-dl 2024-09-29 21:34:47 +02:00

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