Make Boost C++ libraries available for building Python C/C++ extensions.
NOTE: currently header only supported; shared libraries may be availble in the future.
Easy pip install:
pip install boostinator
This should install all platform-independent boost headers (currently from boost 1.74.0).
Exposes a single function to get the include directory:
from boostinator import get_include_dir
# returns a pathlib.Path object
import pathlib
assert isinstance(get_include_dir(), pathlib.Path)
We can now use the libraries when compiling extensions, e.g.:
from distutils.core import setup
from setuptools import Extension
from boostinator import get_include_dir
setup(
...
ext_modules=[
Extension(
'my.CoolExtension',
sources=['myCythonFile.pyx', 'myCppFile.cpp'],
include_dirs=[str(get_include_dir())], # include boost headers
language='c++',
),
],
)