Skip to content

feat(py_wheel): Added requires_file and extra_requires_files attrs #1710

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

Merged
merged 1 commit into from
Jan 23, 2024
Merged

feat(py_wheel): Added requires_file and extra_requires_files attrs #1710

merged 1 commit into from
Jan 23, 2024

Conversation

UebelAndre
Copy link
Contributor

The compile_pip_requirements rule promotes having requirements.in files describe python dependencies. This change aims to allow these files to be the source of truth for constraints by allowing the py_wheel rule to use them for adding requirements to a wheel. This reduces overhead in needing to maintain two lists of equal information (one as he .in and the other as starlark data).

@UebelAndre UebelAndre requested a review from rickeylev as a code owner January 20, 2024 19:16
@UebelAndre
Copy link
Contributor Author

Relates to #644

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 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.

@UebelAndre UebelAndre requested a review from aignas January 21, 2024 15:29
@UebelAndre
Copy link
Contributor Author

@aignas ready for another pass! 😄

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.

Mostly LGTM, thanks for the improvements!

@UebelAndre UebelAndre requested a review from aignas January 22, 2024 13:09
@UebelAndre
Copy link
Contributor Author

@aignas ready for another pass! 😄

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.

LGTM, minus the changelog part

@aignas aignas enabled auto-merge January 23, 2024 00:20
@UebelAndre

This comment was marked as outdated.

@aignas aignas added this pull request to the merge queue Jan 23, 2024
@UebelAndre

This comment was marked as outdated.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 23, 2024
@UebelAndre
Copy link
Contributor Author

@aignas I rebased since I didn't understand what was up with the merge queue.

@aignas aignas enabled auto-merge January 23, 2024 02:45
@aignas aignas added this pull request to the merge queue Jan 23, 2024
Merged via the queue into bazel-contrib:main with commit 5b164a2 Jan 23, 2024
@UebelAndre UebelAndre deleted the requires branch January 23, 2024 06:29
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.
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