You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Build wheels from Bazel toolchains rather than system installed dependencies #3006
We have a few wheels that need to be compiled (eg. cocotb and apytypes). These require certain tools to be available on the PATH. For example cocotb requires clang to be available and apytypes requires cmake. Both of these are available hermetically via Bazel but I don't see how I can expose those toolchains to rules_python and pip to use when building these packages.
Describe the solution you'd like
Some way of passing in toolchains like how genrule does and then a mapping of make variable to tool that can be made available on $PATH when building the wheels.
Describe alternatives you've considered
So far we just end up having to have a full C++ toolchain installed on every dev machine which defeats the purpose of trying to have everything to be self contained, reproducible and hermetic inside of our monorepo.
Thanks, the pip repository rule work is tracked in #2410 and the pip_compile or lock rules may be able to partially use build actions, but it is a much harder problem and it is currently out of scope. The best way for now is to build the wheels for those tools separately and upload it to your private wheel index.
Activity
aignas commentedon Jun 19, 2025
Thanks, the
piprepository rule work is tracked in #2410 and thepip_compileorlockrules may be able to partially use build actions, but it is a much harder problem and it is currently out of scope. The best way for now is to build the wheels for those tools separately and upload it to your private wheel index.sdistin a build action #2410