Skip to content

Add uv export in bazel#254

Open
maxbartel wants to merge 1 commit intobazel-contrib:mainfrom
maxbartel:enable_uv_export
Open

Add uv export in bazel#254
maxbartel wants to merge 1 commit intobazel-contrib:mainfrom
maxbartel:enable_uv_export

Conversation

@maxbartel
Copy link

@maxbartel maxbartel commented May 22, 2025

This adds the uv export command to bazel. uv export and uv pip compile have some slightly different behaviors. The main difference comes when using a uv workspace. With uv export you can ignore those packages, which is probably the behavior you want in a monorepo with bazel. The code is very similar to the one from pip compile.

If you are supportive of this change, I will add docs and update the README.

Thanks!

@maxbartel maxbartel requested a review from a team as a code owner May 22, 2025 14:29
@markelliot
Copy link
Collaborator

Trying to map to how one would use this in a Bazel setup — do you run with multiple rules_python pip hubs?

@mgred
Copy link
Contributor

mgred commented Sep 3, 2025

@markelliot we're using such a uv export rule to write all dependencies of a single package from a workspace into a requirements file and later uv pip install them, put them into a zip file and create a lambda layer for AWS.

@aw632
Copy link

aw632 commented Sep 11, 2025

It would be great to have this in the repo!

@SuperBo
Copy link

SuperBo commented Dec 9, 2025

Hi, I need this feature to keep the same requirement set in uv.lock and requirements.txt

@SuperBo
Copy link

SuperBo commented Dec 17, 2025

Hi @markelliot , do you consider adding this feature to rules_uv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants