rules_python
rules_python copied to clipboard
feat: add whl_filegroup
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