Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion py/private/py_wheel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def _make_py_wheel_info(ctx, wheel_filegroups):
if PyWheelInfo in filegroup:
files_depsets.append(filegroup[PyWheelInfo].files)
runfiles.append(filegroup[PyWheelInfo].default_runfiles)
elif DefaultInfo in filegroup:
elif DefaultInfo in filegroup and not PyInfo in filegroup:
# This is slightly incorrect, but we don't yet have a better way of knowing if the dependency is a filegroup
# that we should consume a wheel from.
Copy link
Member

Choose a reason for hiding this comment

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

file an issue on rules_python, if we think the right fix is to put more Info on these targets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah ideally the PyWheelInfo is removed from rules_py and added to rules_python, and the filegroup in the generated BUILD files for PyPi dependencies become the py_wheel rule.

# What we do know though is we must ignore other py_library dependencies from rules_python, so exclude anything
# that provides the PyInfo provider.
files_depsets.append(filegroup[DefaultInfo].files)
files_depsets.append(filegroup[DefaultInfo].default_runfiles.files)
runfiles.append(filegroup[DefaultInfo].default_runfiles)
Expand Down