-
-
Notifications
You must be signed in to change notification settings - Fork 677
Closed
Description
🐞 bug report
Affected Rule
The issue is caused by the rule:pip.parse
Is this a regression?
Can't test. The reproduction doesn't build on older versions due to #1810
Description
When experimental_target_platforms is used, some whl targets generated have duplicated dependencies, e.g.:
filegroup(
name = "whl",
srcs = ["opencv_python-4.8.1.78-cp37-abi3-macosx_11_0_arm64.whl"],
data = ["@pip//numpy:whl"] + select(
{
"@@platforms//os:osx": ["@pip//numpy:whl"],
"//conditions:default": [],
},
),
visibility = ["//visibility:public"],
)
🔬 Minimal Reproduction
https://github.com/wingsofovnia/rules_python-issues-1873
Lock files generated via bazel run //:requirements_lock.update:
requirements.txt.darwin_aarch64.lockgenerated on Mac M1requirements.txt.linux_x86_32.lockgenerated indocker run --platform linux/amd64container
🔥 Exception or Error
ERROR: /private/var/tmp/.../rules_python~~pip~pip_310_opencv_python/BUILD.bazel:16:10:
in data attribute of filegroup rule @@rules_python~~pip~pip_310_opencv_python//:whl:
Label '@@rules_python~~pip~pip//numpy:whl' is duplicated
🌍 Your Environment
Operating System:
> uname -a # requirements.txt.darwin_aarch64.lock
Darwin CDDEBERMC005031 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
> uname -a # requirements.txt.linux_x86_32.lock
Linux f74bbe09936a 6.6.22-linuxkit #1 SMP Fri Mar 29 12:21:27 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of bazel version:
bazel version
Bazelisk version: v1.19.0
Build label: 7.1.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Mar 21 18:08:37 2024 (1711044517)
Build timestamp: 1711044517
Build timestamp as int: 1711044517
Rules_python version:
HEAD (d3cec48e415dd598a773335532cbc5647c985a93)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels