Closed dsully closed 4 months ago
Hi! We don't read the tool.uv.pip
settings outside the uv pip
CLI — instead use the top-level tool.uv
options that correspond to their pip-specific counterparts.
That doesn't appear to work with pyproject.toml
:
[tool.uv] ■ Additional properties are not allowed ('extra-index-url', 'index-url' were unexpected)
extra-index-url =
And emits a schema validation error.
In uv.toml
if I remove any section wrapper and just have the raw key/value assignments, that works, but emits the same schema validation error.
Will uv pip
inherit these settings? Otherwise there will need to be duplication.
Both of the following work for me?
[tool.uv]
index-url = "https://test.pypi.org/simple"
extra-index-url = ["https://test.pypi.org/simple"]
Are you on the latest version?
Yeah uv pip
will inherit these settings. If you set them in [tool.uv.pip]
that will take precedence over the top-level one.
Yes - uv 0.2.24 (527b711bc 2024-07-10)
I think I found the issue. If there is an empty or commented out uv.toml
then the values in pyproject.toml
won't be read.
There's also the need to update the schema JSON file as well.
Do you mean, the JSON Schema on SchemaStore? Definitely need to update that.
We should probably warn if you have both a uv.toml
and a pyproject.toml
with a [tool.uv]
table in the same directory.
Yes - the JSON Schema on SchemaStore.
I'll use this issue to track adding a warning.
The
uv --preview lock
command does not find/respect settings in either apyproject.toml
or auv.toml
file, and thus resolution fails for internal Pypi repositories:Or in
pyproject.toml
:Passing
--index-url
and--extra-index-url
on the command line does work.