-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure constraints file in config files #7336
Comments
This is roughly a duplicate of #6518 You probably want to read the discussion there regarding constraints from URLs. |
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 [tool.uv]
constraint-dependencies = ["anyio>3"] Then |
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? |
Let's combine with #6518. |
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: