The first example removed all the build scripts and specified compiler flags directly. My example uses PyO3's auto detection mechanism with a hermetic Python toolchain through Bazel.
Also in discussion with the Bazel community, there are some ongoing work in rules_python that may provide necessary information that we can pass to PyO3 as compiler flags https://github.com/bazelbuild/rules_python/issues/824.
Hi @TheButlah, there are two more updated example for using PyO3 with Bazel.
The first example removed all the build scripts and specified compiler flags directly. My example uses PyO3's auto detection mechanism with a hermetic Python toolchain through Bazel.
Also in discussion with the Bazel community, there are some ongoing work in
rules_python
that may provide necessary information that we can pass to PyO3 as compiler flags https://github.com/bazelbuild/rules_python/issues/824.