astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
25.42k stars 739 forks source link

uv to detect uv.toml in active venv #8107

Open Reclocco opened 3 weeks ago

Reclocco commented 3 weeks ago

With pip you can create custom config per venv (custom index-url etc) with pip.conf files. I think it's impossible with uv as it doesn't look for the uv.toml file within the active venv.

This could be helpful with managing these configs if one needs to work with / test different scenarios without modifying repo code or constantly changing uv.toml that is being detected (IIRC it works with closest to cwd working upwards)

charliermarsh commented 3 weeks ago

To clarify, you want to be able to put the uv.toml within the virtual environment directory? Like at .venv/uv.toml or similar?

Reclocco commented 3 weeks ago

Yes