command,list_venv

This commit is contained in:
Marc Beninca 2024-09-29 14:10:06 +02:00
parent 0ba236e266
commit f7de33f0e4
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

22
re.sh
View file

@ -15,13 +15,16 @@ activate() {
pip --version
}
caches() {
local command="${1}"
set \
".cache/pip" \
".cache/uv" \
".local/share/pip" \
".local/share/uv"
echo
echo "caches:"
for cache in "${@}"; do
"${1}" "${HOME}/${cache}"
"${command}" "${HOME}/${cache}"
done
}
deactivate() {
@ -33,7 +36,10 @@ deactivate() {
}
list() {
echo
ls -a -l "${1}/bin"
ls -a -l "${1}/${2}"
}
list_venv() {
list "${1}" "bin"
}
pip_install() {
echo
@ -98,10 +104,10 @@ os="${root}/os"
remove "${os}"
python3 -m "venv" "${os}"
activate "${os}"
list "${os}"
list_venv "${os}"
pip_install --upgrade "pip"
pip_install "uv"
list "${os}"
list_venv "${os}"
set \
"3.12"
@ -121,16 +127,16 @@ deactivate
for version in "${@}"; do
activate "${py}"
list "${py}"
list_venv "${py}"
pip_install "uv"
list "${py}"
list_venv "${py}"
uv_install
for module in "rwx"; do
ln --symbolic \
"/rwx/rwx/${module}" \
"${py}/lib/python${version}/site-packages/${module}"
done
list "${py}"
list_venv "${py}"
done
caches ls
caches list_venv