This commit is contained in:
Marc Beninca 2024-09-28 22:49:09 +02:00
parent 6491592e72
commit ac89a75a7d
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

56
re.sh
View file

@ -5,48 +5,48 @@ url="http://localhost:8000"
url_pypi="${url}/pypi/simple"
activate() {
echo
export VIRTUAL_ENV="${1}"
echo "${VIRTUAL_ENV}"
export OLD_PATH="${PATH}"
export PATH="${VIRTUAL_ENV}/bin:${PATH}"
echo "${PATH}"
python3 --version
pip --version
echo
export VIRTUAL_ENV="${1}"
echo "${VIRTUAL_ENV}"
export OLD_PATH="${PATH}"
export PATH="${VIRTUAL_ENV}/bin:${PATH}"
echo "${PATH}"
python3 --version
pip --version
}
deactivate() {
echo
echo "${VIRTUAL_ENV}"
export PATH="${OLD_PATH}"
echo "${PATH}"
unset OLD_PATH VIRTUAL_ENV
echo
echo "${VIRTUAL_ENV}"
export PATH="${OLD_PATH}"
echo "${PATH}"
unset OLD_PATH VIRTUAL_ENV
}
list() {
echo
ls -a -l "${1}/bin"
echo
ls -a -l "${1}/bin"
}
pip_install() {
echo
pip install --index-url "${url_pypi}" "${@}"
echo
pip install --index-url "${url_pypi}" "${@}"
}
remove() {
rm --force --recursive "${@}"
rm --force --recursive "${@}"
}
uv_install() {
echo
uv pip install --index-url "${url_pypi}" "${@}"
echo
uv pip install --index-url "${url_pypi}" "${@}"
}
uv_python() {
echo
export UV_PYTHON_INSTALL_MIRROR="${url}/cpypy"
uv python install
#--cache-dir "${1}/cpypy"
unset UV_PYTHON_INSTALL_MIRROR
echo
export UV_PYTHON_INSTALL_MIRROR="${url}/cpypy"
uv python install
#--cache-dir "${1}/cpypy"
unset UV_PYTHON_INSTALL_MIRROR
}
uv_venv() {
echo
uv venv --index-url "${url_pypi}" --seed "${1}"
#--cache-dir "${1}/cpypy"
echo
uv venv --index-url "${url_pypi}" --seed "${1}"
#--cache-dir "${1}/cpypy"
}
remove ~/.cache/pip ~/.local/share/uv