mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Remove packages when syncing (#135)
`pip-sync` will now uninstall any packages that aren't necessary. Closes https://github.com/astral-sh/puffin/issues/128.
This commit is contained in:
parent
41ece4184b
commit
bd01fb490e
8 changed files with 215 additions and 132 deletions
|
@ -17,18 +17,18 @@ TARGET=${1}
|
|||
###
|
||||
hyperfine --runs 20 --warmup 3 \
|
||||
--prepare "virtualenv --clear .venv" \
|
||||
"./target/release/puffin pip-sync ${TARGET} --ignore-installed --no-cache" \
|
||||
"./target/release/puffin pip-sync ${TARGET} --no-cache" \
|
||||
--prepare "rm -rf /tmp/site-packages" \
|
||||
"pip install -r ${TARGET} --target /tmp/site-packages --ignore-installed --no-cache-dir --no-deps"
|
||||
"pip install -r ${TARGET} --target /tmp/site-packages --no-cache-dir --no-deps"
|
||||
|
||||
###
|
||||
# Installation with a warm cache, similar to blowing away and re-creating a virtual environment.
|
||||
###
|
||||
hyperfine --runs 20 --warmup 3 \
|
||||
--prepare "virtualenv --clear .venv" \
|
||||
"./target/release/puffin pip-sync ${TARGET} --ignore-installed" \
|
||||
"./target/release/puffin pip-sync ${TARGET}" \
|
||||
--prepare "rm -rf /tmp/site-packages" \
|
||||
"pip install -r ${TARGET} --target /tmp/site-packages --ignore-installed --no-deps"
|
||||
"pip install -r ${TARGET} --target /tmp/site-packages --no-deps"
|
||||
|
||||
###
|
||||
# Installation with all dependencies already installed (no-op).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue