8000 Make lazily fetching dependencies compatible to disallow_empty_glob by martis42 · Pull Request #477 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

Make lazily fetching dependencies compatible to disallow_empty_glob #477

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 2 commits into from
Jun 9, 2021
Merged

Make lazily fetching dependencies compatible to disallow_empty_glob #477

merged 2 commits into from
Jun 9, 2021

Conversation

martis42
Copy link
Contributor

Some python packages are provided as .tar.gz instead of .whl.
In such cases globbing for ".whl" files returns an empty result.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #476

What is the new behavior?

The behavior described in the issue is resolved and thus fetching dependencies lazily while using --incompatible_disallow_empty_glob becomes possible.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Some python packages are provided as ".tar.gz" instead of ".whl".
In such cases globbing for ".whl" files returns an empty result.
@martis42 martis42 requested review from brandjon and lberki as code owners May 28, 2021 21:26
@google-cla google-cla bot added the cla: yes label May 28, 2021
Copy link
@thundergolfer thundergolfer left a comment

Choose a reason for hiding this comment

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

LGTM but also requesting @hrfuller as pip_parse owner.

@thundergolfer thundergolfer requested a review from hrfuller June 9, 2021 00:06
@@ -39,7 +39,7 @@ def generate_build_file_contents(

filegroup(
name="{whl_file_label}",
srcs=glob(["*.whl"]),
srcs=glob(["*.whl"], allow_empty = True),
Copy link
Contributor
@hrfuller hrfuller Jun 9, 2021

Choose a reason for hiding this comment

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

Seems okay to me. It could be strange for consumers of the raw wheel files to get less wheels than are in their requirements_lock.txt but I suppose someone who only wants to resolve wheels can pass `--binary-only=":all:"

@hrfuller hrfuller merged commit 915f21b into bazel-contrib:master Jun 9, 2021
@martis42 martis42 deleted the make_lazily_fetching_compatible_to_disallow_empty_glob branch June 9, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0