Have there been any examples of writing a python s...
# general
h
Have there been any examples of writing a python source that gets a binding from a C++ implementation? I know bazel supports this, but I'm guessing Pants would be difficult without dedicated C++ support.
b
We build wheels from C++ source in our repo 🤷‍♂️
h
Any more details to share? Tips or tricks on where to start would be great if you had any them.
b
It's not a very complicated thing because all the relevant code is self-contained. Other than that we use
setup.py
and let the normal "compile this native code into a wheel" stuff take over.
h
Pants can build wheels that embed native code by delegating that to setuptools or whatever your pep-517 build backend is. This works great for relatively small, simple native sources where it's OK to rebuild them all naively if any of them change. And assumes that the test of the native code are written in Python. If there were large-scale native projects with tests, codegen etc. then we'd need "proper" C++ support