uv/crates/uv-python
bluss e46c24d3cf
Implement uv run --directory (#5566)
## Summary

uv run --directory <path> means that one doesn't have to change to a
project's directory to run programs from it. It makes it possible to use
projects as if they are tool installations.

To support this, first the code reading .python-version was updated so
that
it can read such markers outside the current directory. Note the minor
change this causes (if I'm right), described in the commit.

## Test Plan

One test has been added.

## --directory

Not sure what the name of the argument should be, but it's following uv
sync's directory for now.

Other alternatives could be "--project". Uv run and uv tool run should
probably find common agreement on this (relevant for project-locked
tools).

I've implemented this same change in Rye, some time ago, and then we
went
with --pyproject `<`path to pyproject.toml file`>`. I think using
pyproject.toml file path and not directory was probably a mistake, an
overgeneralization one doesn't need.
2024-07-29 15:53:10 -04:00
..
python Change "toolchain" to "python" (#4735) 2024-07-03 07:44:29 -05:00
src Implement uv run --directory (#5566) 2024-07-29 15:53:10 -04:00
Cargo.toml Upgrade to Rust 1.80.0 (#5472) 2024-07-27 01:49:47 +00:00
download-metadata.json Update bundled Pythons to include stripped variants (#5469) 2024-07-26 00:34:45 +00:00
fetch-download-metadata.py Use stripped variants by default in Python install (#5451) 2024-07-25 17:29:31 +00:00
template-download-metadata.py Add PyPy finder (#5337) 2024-07-23 14:58:04 -05:00