boost-python3

C++ library for seamless C++/Python3 interoperability and bindings

brewmacoslinux
Try with needOr install directly
Source

About

C++ library for C++/Python3 interoperability

Commands

boost_python3

Examples

Compile C++ code with Boost.Python3 library for Python module creation$ g++ -c mymodule.cpp -I$(python3-config --includes) -I$(brew --prefix boost-python3)/include -fPIC
Link compiled object files into a Python3 extension module$ g++ -shared mymodule.o -o mymodule.so -L$(brew --prefix boost-python3)/lib -lboost_python3
Import and use a Boost.Python3-created extension in Python3$ python3 -c "import mymodule; mymodule.my_cpp_function()"