rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

feat(bzlmod): support wheel-only additions to the hub repo

Open aignas opened this issue 1 year ago • 1 comments

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

aignas avatar Feb 05 '24 02:02 aignas

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.

aignas avatar Feb 05 '24 02:02 aignas

This depends on #1750 and #1764. Will continue work on this once those get merged.

aignas avatar Feb 29 '24 07:02 aignas

This should merge #1811 as the right fix for platform specific wheel platform setting.

aignas avatar Mar 18 '24 03:03 aignas

I'll close this for now as I focus on the implementation outlined in this design doc.

aignas avatar Mar 26 '24 03:03 aignas