-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_uv.sh
executable file
·35 lines (30 loc) · 1.12 KB
/
test_uv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
uninstall_packages() {
uv pip freeze | grep -v "^uv==" | grep -v '\-e' | xargs uv pip uninstall
}
# prepare virtualenv to run our tests
uv sync
uv venv activate
uv cache clean
echo "--------------------------------------------"
echo "Public PYPI PROXY"
uv pip install --index-url https://pypi.org/simple/ -r requirements.txt
uninstall_packages
echo "Reinstall"
uv pip install --index-url https://pypi.org/simple/ -r requirements.txt
uninstall_packages
echo "--------------------------------------------"
echo "LOCAL PYPI PROXY (keep cache-control header)"
uv pip install --index-url http://localhost:8000/cached/ -r requirements.txt
uninstall_packages
echo "Reinstall"
uv pip install --index-url http://localhost:8000/cached/ -r requirements.txt
uninstall_packages
echo "--------------------------------------------"
echo "LOCAL PYPI PROXY (cache-control: no-cache)"
uv pip install --index-url http://localhost:8000/no_cache/ -r requirements.txt
uninstall_packages
echo "Reinstall"
# This is the command which has slow Resolve
uv pip install --index-url http://localhost:8000/no_cache/ -r requirements.txt
uninstall_packages