feat(bzlmod): support wheel-only additions to the hub repo
With this PR we can reuse the same hub-repo and setup download_only = True
closures, which use only wheels but download the right platform specific wheels
independent of the host platform. That should allow users to build images with
rules_oci without needing to write extra code to create alias repos which
mimic the behaviour of rules_python ones.
This is stacked on #1743.
The snippet of the resultant pylint hub repo alias that is the main goal is:
alias(
name = "pkg",
actual = select(
{
"//:is_python_3.9": "@pip_39_pylint//:pkg",
"//:is_python_3.9_linux_x86_64": "@pip_39_manylinux_2_17_x86_64_39_pylint//:pkg",
"//:is_python_3.10": "@pip_310_pylint//:pkg",
"//:is_linux_x86_64": "@pip_39_manylinux_2_17_x86_64_39_pylint//:pkg",
"//conditions:default": "@pip_39_pylint//:pkg",
},
),
)
Work towards #1606
Right now the examples/bzlmod suceeds locally on a linux laptop:
bazel build @pip//pylint
However pyyaml is not available as a whl yet, hence the failure of the tests.
This depends on #1750 and #1764. Will continue work on this once those get merged.
This should merge #1811 as the right fix for platform specific wheel platform setting.
I'll close this for now as I focus on the implementation outlined in this design doc.