rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

feat: add whl_filegroup

Open lalten opened this issue 1 year ago • 0 comments

Thanks for the feedback and ideas on https://github.com/bazelbuild/rules_python/pull/1903 @aignas! I liked the whl_filegroup idea, here's a PR :)

This adds a whl_filegroup API

load("@rules_python//python:pip.bzl", "whl_filegroup")

whl_filegroup(
    name = "numpy_includes",
    pattern = "numpy/core/include/numpy",
    whl = "@pypi//numpy:whl",
)

which is handy to extract certain files from a wheel, e.g. to make a numpy header cc_library (see tests).

Would be happy about a review! You can see this in action in

lalten avatar May 16 '24 11:05 lalten