Skip to content

fix: requires_file preserves extras that package depends on #2807

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

Conversation

skongum02
Copy link
Contributor

When requirements are passed in through requires_file the extras are not preserved.

eg if the contents of requires file is example[extras]==1.1.1, bazel will currently write to the METADATA file Requires-Dist: example==1.1.1. This PR attempts to fix that by adding that back if there are any extras.

The expected output should be Requires-Dist: example[extras]==1.1.1

py_wheel(
name = "requires_dist_depends_on_extras",
distribution = "requires_dist_depends_on_extras",
requires = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently passes without any code changes, but just adding this for completeness

@skongum02
Copy link
Contributor Author

Hello @rickeylev @aignas any chance you all can take a look at this PR?

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM. Could you please add a line to the Fixed section in CHANGELOG?

@skongum02 skongum02 force-pushed the skongum0s-allow-extras-deps-in-requires-dist branch from 4403859 to 26daecb Compare May 1, 2025 20:16
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@aignas aignas added this pull request to the merge queue May 2, 2025
Merged via the queue into bazel-contrib:main with commit 76b221e May 2, 2025
3 checks passed
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.

2 participants