Skip to content
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

Add option to uv export to obtain version in workspace packages #11250

Open
ivan94fi opened this issue Feb 5, 2025 · 0 comments
Open

Add option to uv export to obtain version in workspace packages #11250

ivan94fi opened this issue Feb 5, 2025 · 0 comments
Labels
enhancement New feature or improvement to existing functionality

Comments

@ivan94fi
Copy link

ivan94fi commented Feb 5, 2025

Summary

Description

We have a monorepo project, which is composed of several python packages. We use uv as project manager and we use a private pypi server where our wheels are published. When creating the docker image for our product we install the packages from the private pypi server, so we need exact versions, and we would like to avoid having to mount the sources, to be sure to have the published version in the final docker image.

Request

We would like to obtain package versions also for workspace members whe using uv export --frozen, so that later we can just install the generated requirements file and get packages from the pypi server.

Current situation:

Command:
uv export --frozen --no-hashes

Output:

-e ./packages/company.package1
-e ./packages/company.package2
-e ./packages/company.package3
-e ./packages/company.package4
accelerate==1.1.0
annotated-types==0.7.0
anyio==4.6.2.post1
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
.
.
.

Example

Here we use an hypothetical --emit-workspace-with-versions flag, to emit the workspace members as "remote" dependencies.

Command:
uv export --frozen --emit-workspace-with-versions --no-hashes

Output:

company.package1=1.3.2
company.package2==0.3.2
company.package3==1.0.0
company.package4==3.2.2
accelerate==1.1.0
annotated-types==0.7.0
anyio==4.6.2.post1
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
.
.
.

The versions in the workspace's members here are the ones taken from the pyproject.toml file of each member at the time the command is run.

@ivan94fi ivan94fi added the enhancement New feature or improvement to existing functionality label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant