Skip to content

pip.parse fails for source-less wheels with dependencies#4053

Description

@hartikainen

(I diagnosed this with heavy help from Opus.)

馃悶 bug report

Affected Rule

pip.parse.

Is this a regression?

Yes, I believe 2.2.0 works, while 2.3.1 fails.

Description

I expected py-spy==0.4.1 to work as a py_library dependency, but observed that whl_library_targets points the wrapper's srcs at an empty source target. Bazel then rejects the wrapper during analysis.

馃敩 Minimal Reproduction

See examples/py-spy.

From that directory, run:

bazel test //:py_spy_test

馃敟 Exception or Error

... //:srcs does not produce any py_library srcs files (expected .py or .py3)

馃實 Your Environment

Operating System:

macOS 26.5.2 arm64

Output of bazel version:

Build label: 9.2.0

Rules_python version:

2.3.1

Anything else relevant?

The workaround is to stay on 2.2.0. I have a small fix and unit tests on the separate py-spy-fix branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions