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" url_pypi="${url}/pypi/simple"
activate() { activate() {
echo echo
export VIRTUAL_ENV="${1}" export VIRTUAL_ENV="${1}"
echo "${VIRTUAL_ENV}" echo "${VIRTUAL_ENV}"
export OLD_PATH="${PATH}" export OLD_PATH="${PATH}"
export PATH="${VIRTUAL_ENV}/bin:${PATH}" export PATH="${VIRTUAL_ENV}/bin:${PATH}"
echo "${PATH}" echo "${PATH}"
python3 --version python3 --version
pip --version pip --version
} }
deactivate() { deactivate() {
echo echo
echo "${VIRTUAL_ENV}" echo "${VIRTUAL_ENV}"
export PATH="${OLD_PATH}" export PATH="${OLD_PATH}"
echo "${PATH}" echo "${PATH}"
unset OLD_PATH VIRTUAL_ENV unset OLD_PATH VIRTUAL_ENV
} }
list() { list() {
echo echo
ls -a -l "${1}/bin" ls -a -l "${1}/bin"
} }
pip_install() { pip_install() {
echo echo
pip install --index-url "${url_pypi}" "${@}" pip install --index-url "${url_pypi}" "${@}"
} }
remove() { remove() {
rm --force --recursive "${@}" rm --force --recursive "${@}"
} }
uv_install() { uv_install() {
echo echo
uv pip install --index-url "${url_pypi}" "${@}" uv pip install --index-url "${url_pypi}" "${@}"
} }
uv_python() { uv_python() {
echo echo
export UV_PYTHON_INSTALL_MIRROR="${url}/cpypy" export UV_PYTHON_INSTALL_MIRROR="${url}/cpypy"
uv python install uv python install
#--cache-dir "${1}/cpypy" #--cache-dir "${1}/cpypy"
unset UV_PYTHON_INSTALL_MIRROR unset UV_PYTHON_INSTALL_MIRROR
} }
uv_venv() { uv_venv() {
echo echo
uv venv --index-url "${url_pypi}" --seed "${1}" uv venv --index-url "${url_pypi}" --seed "${1}"
#--cache-dir "${1}/cpypy" #--cache-dir "${1}/cpypy"
} }
remove ~/.cache/pip ~/.local/share/uv remove ~/.cache/pip ~/.local/share/uv