feat(pybind11): added infra to compile with pybind11

This commit is contained in:
2025-04-30 11:39:36 -04:00
parent 9ed4e6f328
commit 57d60d7bb7
6 changed files with 46 additions and 0 deletions

17
build-python/meson.build Normal file
View File

@@ -0,0 +1,17 @@
# --- Python Extension Setup ---
py_installation = import('python').find_installation('python3')
py_mod = py_installation.extension_module(
'fourdsse_bindings', # Name of the generated .so/.pyd file (without extension)
sources: [
meson.project_source_root() + '/src/python/composition/bindings.cpp',
],
dependencies : [
pybind11_dep,
composition_dep,
species_weight_dep
],
cpp_args : ['-UNDEBUG'], # Example: Ensure assertions are enabled if needed
install : true,
subdir: 'fourdstar' # Optional: Install the module inside a 'fourdsse' Python package directory
)