uv
792dc9d1 - Add `uv sync --script` (#11361)

Commit
304 days ago
Add `uv sync --script` (#11361) ## Summary The environment is located at a stable path within the cache, based on the script's absolute path. If a lockfile exists for the script, then we use our standard lockfile semantics (i.e., update the lockfile if necessary, etc.); if not, we just do a `uv pip sync` (roughly). Example usage: ``` ❯ uv init --script hello.py Initialized script at `hello.py` ❯ uv add --script hello.py requests Updated `hello.py` ❯ cargo run sync --script hello.py Using script environment at: /Users/crmarsh/.cache/uv/environments-v1/hello-84e289fe3f6241a0 Resolved 5 packages in 3ms Installed 5 packages in 12ms + certifi==2025.1.31 + charset-normalizer==3.4.1 + idna==3.10 + requests==2.32.3 + urllib3==2.3.0 ``` Closes https://github.com/astral-sh/uv/issues/6637.
Author
Parents
Loading