diegoferigo / cmake-build-extension

Setuptools extension to build and package CMake projects
https://pypi.org/project/cmake-build-extension/
MIT License
67 stars 16 forks source link

Add `pybind11` example #22

Closed diegoferigo closed 3 years ago

diegoferigo commented 3 years ago

The example now provides a single mymath demo library with two independent ways to create bindings: SWIG and pybind11.

The packaging structure is the following:

It is a bit odd but it's the only way to share the C++ library while showing both systems. In most cases, only one of two between SWIG and pybind11 are used, and it's simple to just remove what is not used.

It also shows that multiple CMakeExtension entries can be used in setup.py.