diff --git a/build-config/pybind/meson.build b/build-config/pybind/meson.build new file mode 100644 index 0000000..e69de29 diff --git a/build-python/meson.build b/build-python/meson.build new file mode 100644 index 0000000..bd87563 --- /dev/null +++ b/build-python/meson.build @@ -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 +) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..530c8f1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[build-system] +requires = [ + "meson-python>=0.15.0", # Use a recent version + "meson>=1.6.0", # Specify your Meson version requirement + "pybind11>=2.10" # pybind11 headers needed at build time +] +build-backend = "mesonpy" + +[project] +name = "fourdstar" # Choose your Python package name +version = "0.1.0" # Your project's version +description = "Python interface for the 4DSSE C++ project" +readme = "Readme.md" +license = { file = "LICENSE.txt" } # Reference your license file [cite: 2] +# Add authors, classifiers, URLs etc. as needed +# See: https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ \ No newline at end of file diff --git a/src/composition/py/meson.build b/src/composition/py/meson.build new file mode 100644 index 0000000..e69de29 diff --git a/src/python/fourdstar/__init__.py b/src/python/fourdstar/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/subprojects/pybind11.wrap b/subprojects/pybind11.wrap new file mode 100644 index 0000000..b4024bb --- /dev/null +++ b/subprojects/pybind11.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = pybind11-2.13.5 +source_url = https://github.com/pybind/pybind11/archive/refs/tags/v2.13.5.tar.gz +source_filename = pybind11-2.13.5.tar.gz +source_hash = b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252 +patch_filename = pybind11_2.13.5-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/pybind11_2.13.5-1/get_patch +patch_hash = ecb031b830481560b3d8487ed63ba4f5509a074be42f5d19af64d844c795e15b +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pybind11_2.13.5-1/pybind11-2.13.5.tar.gz +wrapdb_version = 2.13.5-1 + +[provide] +pybind11 = pybind11_dep