You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uv currently only allows passing this as environment variable or with the --constraint CLI argument.
In our team, we have a shared global constraints file that's used by all our projects. This way we can quickly exclude broken upstream package versions across all our projects.
With pip, we set the PIP_CONSTRAINT variable in all CI pipelines, and for local development, every engineer has constraint = https://host.local/my-global-constraints.txt in their global pip.conf file. With uv, this is not possible right now. If it were supported in config files, we might just configure it in every project's pyproject.toml.
The same thing would be useful for us in build constraints.
The text was updated successfully, but these errors were encountered:
Hi @zanieb , thank you for the quick reply. The issue @robertschweizer mentions is for projects we build using 'uv pip install'. In #6518 you say that 'constraint-dependencies' setting is applied to every single uv command and therefore passing a URL to it is not desirable.
Would it be possible to support 'constraint' and 'build-constraint' settings in the [tool.uv.pip] pyproject.toml section instead?
I'm pretty sure that constraint-dependencies in [tool.uv] is respected within the current workspace for uv pip commands. So if the pyproject.toml in the current directory has:
[tool.uv]
constraint-dependencies = ["anyio>3"]
Then uv pip commands in that directory will respect the anyio>3 constraint.
Hi @charliermarsh , thank you for your reply, I think you are right, but what we need is to be able to pass an URL. In the related issue #6518 this is discussed, but URL support is dismissed because that config is used for every uv command and that URL would be accessed unnecessarily. That is reasonable, and that is why we ask to add 'constraint' settings in the [tool.uv.pip] (so the URL is only accessed for URL commands). Does it make sense?
Thanks a lot for this great project!
It would be cool if
uv.toml
andpyproject.toml
allowed specifyinguv
currently only allows passing this as environment variable or with the--constraint
CLI argument.In our team, we have a shared global constraints file that's used by all our projects. This way we can quickly exclude broken upstream package versions across all our projects.
With pip, we set the
PIP_CONSTRAINT
variable in all CI pipelines, and for local development, every engineer hasconstraint = https://host.local/my-global-constraints.txt
in their globalpip.conf
file. Withuv
, this is not possible right now. If it were supported in config files, we might just configure it in every project'spyproject.toml
.The same thing would be useful for us in build constraints.
The text was updated successfully, but these errors were encountered: