If working in C++ land, I'd agree this is the nicest approach. It does, however, require linking against a specific libpython version [1], unlike Milksnake. But I'm not sure that's a bad thing...
[1] http://pybind11.readthedocs.io/en/master/basics.html#creatin...
Re:Speed up your Python using Rust
by stochastic_monk on Saturday November 18, 2017 @10:45PM
(#15732139)
True. It's not that bad, though -- "python3-config --extension-suffix" or "python-config --extension-suffix" is all it takes to generate the suffix you want, and you can drop it straight in your site-packages folder. At that point, you're just dropping the 3 or not depending on your version.
It's not as simple as milksnake. I would like to see some smarter extensions added to pybind11, but I'm okay with that for now.
For example, the binding of an accelerated HyperLogLog implementation only requires tiny amount of work, plus a line in my Makefile:
[1] https://github.com/pybind/pybind11