From fa035072c1c34b02a0ae338dd60ab9315927d786 Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Wed, 3 Dec 2025 16:46:24 -0800 Subject: [PATCH] build(packaging): Add pyproject.toml for dapper binary Python wheel packaging (#231) Adds a pyproject.toml file to configure the build system for creating a Python wheel that includes the compiled Rust binary. This enables distribution and installation of the Rust functionality via pip without requiring users to install a rust compiler. Signed-off-by: Ryan Mast --- pyproject.toml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9b25c20 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,39 @@ +[build-system] +requires = ["maturin>=1.5,<2"] +build-backend = "maturin" + +[project] +name = "dapper-bin" +description = "pip installable dapper binaries" +readme = "README.md" +authors = [{ name = "Ryan Mast", email = "mast9@llnl.gov" }] +license = "MIT" +license-files = ["LICENSE", "NOTICE"] +requires-python = ">=3.8" +keywords = ["source-code-analysis", "c", "c++", "python", "bash", "tree-sitter", "rust"] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Topic :: Database", + "Topic :: Security", + "Topic :: Utilities", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/LLNL/dapper" +Issues = "https://github.com/LLNL/dapper/issues" + +[tool.maturin] +# Build the Rust binary as a Python CLI using maturin's `bindings = "bin"`. +bindings = "bin" +# Point maturin at the crate manifest in the repo root. +manifest-path = "Cargo.toml" +# Name of the exposed module/CLI (sets the wheel name and console script). +module-name = "dapper" + +## No [project.scripts] needed; maturin will generate the console entrypoint in bin mode \ No newline at end of file