-
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
Building and publishing uv workspace members with pinned version constraints #9811
Comments
I have opened this issue and I think we are trying to achieve the same goal. |
Related
(though I think this request is distinct) |
It would be nice to have some automated support for this, but, as described in the linked issues, it's sort of hard to do this in a spec-compliant way. We haven't designed a solution for this category of problem yet. |
Hey, thanks for the pointing out the related topics. I must have overlooked #8729 for some reason. I think it's the one most related to my problem. So as for now there is no standard way to do this. In the meanwhile do you have any suggestions on how to handle this? I mean for version bumping I am using a separate tool anyways atm. So I might give it a try to manually add the version constraint in the dependency groups and make that tool update the other pyproject.toml files as well. Though maybe not intended it at least did not seem to break anything when adding version constraints on workspace members (funny enough not even if the version does not match the one in the workspace at all) |
So this is not fully related to the marked issue but at least covered by it. Maybe this is even possible for only workspaces? |
Hey,
first of all. Thanks a lot for your efforts on making the python tooling ecosystem better! I love ruff and uv :). Please keep up the great work.
I am currently migrating an existing monorepo from poetry using the poetry-monorepo-dependency-plugin to uv.
I thought that uv workspaces should be the way to handle this usecase.
The current setup looks somewhat like this:
uv tree gives the following output to show the inter_package dependecies:
So my previous setup did allow me to publish the packages individually to our internal pypi mirror with pinned versions of the dependencies.
My main pyproject.toml looks like this atm. (in reality the workspace members are added to the toplevel virtual workspace package to be able to omit the
--al--packages
onuv sync
):With e.g. the package_a pyproject.toml being:
This demo setup has basically been fully created with several
uv init
calls.The hope was that
uv build --package-a --wheel
would output a wheel that has the pinned lower version of the dependencypackage-b
listed internally. At least this is what my previous setup did.Instead I get a METADATA file like this:
When published to our pypi instance this would ofcource not resolve to the actual boundary of
package-b>=0.2.0,<0.3
that would be required here.After bumping e.g. the patch version of
package-b
I would also assume that the version inside the METADATA is bumped to e.g. 0.2.1.Is this use-case supported? What is the current approach to handle this properly? I am open for suggestions!
Best regards
Michael
The text was updated successfully, but these errors were encountered: