Skip to content

Pip packages with dependencies don't work in bzlmod #884

@calliecameron

Description

@calliecameron

🐞 bug report

Affected Rule

Bzlmod pip extension.

Description

Adding a pip package that has dependencies to a module's requirements causes a build error. As far as I can see, the packages used in examples/bzlmod don't have dependencies, so don't trigger this error.

Is there a workaround?

🔬 Minimal Reproduction

Make the following changes to examples/bzlmod:

  1. in requirements.in: add pylint~=2.15.5
  2. run bazel run :requirements.update
  3. in BUILD.bazel: add requirement("pylint") to the deps of lib
  4. bazel build :all

🔥 Exception or Error

ERROR: /home/callie/.cache/bazel/_bazel_callie/b170dd4516a10b127f4fcc4b68613d37/external/rules_python~override~pip~pip_pylint/BUILD.bazel:22:11: no such package '@[unknown repo 'pip_typing_extensions' requested from @rules_python~override~pip~pip_pylint]//': The repository '@[unknown repo 'pip_typing_extensions' requested from @rules_python~override~pip~pip_pylint]' could not be resolved: No repository visible as '@pip_typing_extensions' from repository '@rules_python~override~pip~pip_pylint' and referenced by '@rules_python~override~pip~pip_pylint//:pkg'

🌍 Your Environment

Operating System:

  
Linux Mint 20.1
  

Output of bazel version:

  
Bazelisk version: v1.13.2
Build label: 6.0.0rc1
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Oct 31 10:41:40 2022 (1667212900)
Build timestamp: 1667212900
Build timestamp as int: 1667212900
  

Rules_python version:

  
0.14.0
  

Anything else relevant?

Metadata

Metadata

Assignees

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