Skip to content

Conversation

kageiit
Copy link
Contributor

@kageiit kageiit commented Mar 2, 2021

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?

Using wheels like keyring (https://pypi.org/project/keyring) , pip_install fails with an error like

  File "/private/var/tmp/_bazel_gkorlam/a1f9cb65ef7d02cf04534e97e406c6b9/external/rules_python/python/pip_install/extract_wheels/lib/bazel.py", line 187, in extract_wheel
    with open(os.path.join(directory, "BUILD"), "w") as build_file:
IsADirectoryError: [Errno 21] Is a directory: 'pypi__keyring/BUILD'

This is because the extracted whl file has a build directory in it.
Screen Shot 2021-03-02 at 2 00 39 PM

Issue Number: N/A

What is the new behavior?

By changing the build file to BUILD.bazel it is much less likely to encounter this issue. pip_install succeeds in importing the keyring whl after this change.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kageiit kageiit requested review from brandjon and lberki as code owners March 2, 2021 22:01
@google-cla google-cla bot added the cla: yes label Mar 2, 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.

👍

@thundergolfer thundergolfer merged commit 4b7ac91 into bazel-contrib:master Mar 3, 2021
@kageiit kageiit deleted the build_bazel branch March 4, 2021 00:19
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.

2 participants