feat(py_wheel): Added requires_file and extra_requires_files attrs#1710
Merged
aignas merged 1 commit intobazel-contrib:mainfrom Jan 23, 2024
UebelAndre:requires
Merged
feat(py_wheel): Added requires_file and extra_requires_files attrs#1710aignas merged 1 commit intobazel-contrib:mainfrom UebelAndre:requires
requires_file and extra_requires_files attrs#1710aignas merged 1 commit intobazel-contrib:mainfrom
UebelAndre:requires
Conversation
Contributor
Author
|
Relates to #644 |
aignas
reviewed
Jan 21, 2024
Collaborator
aignas
left a comment
There was a problem hiding this comment.
Thanks for the PR.
One more usecase which comes to my mind that this PR enables is to have a consistent wheel built with classic pyproject.toml which reads the requires directives from files (which is an example in pip-tools repo) and the rules_python packaging rule. I am not sure if this would be useful to someone, but this interop possibility is nice in its own right.
Contributor
Author
|
@aignas ready for another pass! 😄 |
aignas
reviewed
Jan 22, 2024
Collaborator
aignas
left a comment
There was a problem hiding this comment.
Mostly LGTM, thanks for the improvements!
Contributor
Author
|
@aignas ready for another pass! 😄 |
aignas
approved these changes
Jan 23, 2024
Collaborator
aignas
left a comment
There was a problem hiding this comment.
LGTM, minus the changelog part
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
@aignas I rebased since I didn't understand what was up with the merge queue. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 24, 2024
) The `requires_file` and `extra_requires_files` attributes added by #1710 break wheels by leaving trailing `;` and currently do not support `requirements.in` files with comments following a constraint on the same line. This PR fixes these issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
compile_pip_requirementsrule promotes havingrequirements.infiles describe python dependencies. This change aims to allow these files to be the source of truth for constraints by allowing thepy_wheelrule to use them for adding requirements to a wheel. This reduces overhead in needing to maintain two lists of equal information (one as he.inand the other as starlark data).