For anyone looking for a more usable version of C++/Python interop, I can't recommend Cppyy[0] highly enough. You can use any C++ code/libraries from Python without the need to write any bindings. I created an example project here to test it out[1].
I believe it's no longer the case. The maintainer of Cppyy was cautioning that the Python 3 support was somewhat experimental at the time, but I believe it's officially supported now. Either way, it could have been solved by building from source, but I was feeling lazy :)
> The exact same Python++ file can be fed in unmodified to a stock C++ compiler and a stock Python interpreter and you will get the same output. The first version of Python++ was developed by William W Wold for the Stupid Shit No One Needs and Terrible Ideas Hackathon 2017.
If anyone seriously want to write a program that works equally in Python and C++, use Haxe, which compiles to a few more targets as well: JavaScript, Java, C#, C (HashLink), Lua etc.
Haxe isn't a polyglot, but a compiled language though.
All I really want is a minimum effort way to map C++ libraries to Python in a way that supports Numpy and is not tied to a Python version. CFFI is close, but it could be even more ergonomic. Build scripts can generate everything else automatically, outside Numpy functions.
0. https://cppyy.readthedocs.io/en/latest/
1. https://github.com/jclay/cppyy-knearestneighbors-example