Open chrisrodrigue opened 1 month ago
This seems reasonable to me though want a second opinion before adding any configuration.
A more elegant and concise alternative (similar to pdm
as shown here - passing constant arguments to every pdm invocation):
[tool.uv.options]
venv = ["--relocatable", "--system-site-packages"]
When running
uv venv
, the user may specify the options--system-site-packages
and--relocatable
. These values persist in.venv/pyenv.cfg
as shown:The
uv sync
command implicitly creates a virtual environment in.venv
, which is awesome. However, it is not possible to pass these options touv sync
or set them in thetool.uv
section (or atool.uv.venv
section) ofpyproject.toml
. The virtual environment created withuv sync
always defaults to settinginclude-system-site-package
andrelocatable
tofalse
.I propose that
uv
be capable of reading these frompyproject.toml
, and also when passed touv sync
.Maybe a generalized approach to file-based configuration (both
uv.toml
andpyproject.toml
) ofuv
behavior could be to support a section corresponding to eachuv
command for all available options:Example
pyproject.toml
demonstrating command customization: