-
Notifications
You must be signed in to change notification settings - Fork 4
build(packaging): Add pyproject.toml for dapper binary Python wheel packaging #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ackaging (#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 <mast9@llnl.gov>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a pyproject.toml file at the repository root to enable distribution of the Rust-based dapper CLI tool as a Python wheel package via maturin. This complements the existing python/pyproject.toml which packages the dapper-python library, by providing a separate binary distribution mechanism.
Key Changes:
- Configures maturin as the build backend with bin bindings to package the Rust binary
- Defines package metadata for "dapper-bin" with Python >=3.8 requirement
- References the root Cargo.toml manifest to build the dapper binary
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| [project] | ||
| name = "dapper-bin" | ||
| description = "pip installable dapper binaries" |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The description should capitalize "pip" to "Pip" or use it with a hyphen ("pip-installable") for better grammar and consistency with common Python packaging conventions.
| description = "pip installable dapper binaries" | |
| description = "pip-installable dapper binaries" |
| 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", | ||
| ] |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The classifiers list is missing a license classifier. Consider adding "License :: OSI Approved :: MIT License" to be consistent with the license field and provide better discoverability on PyPI.
| # 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" |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module-name configuration may not be necessary or appropriate for bindings = "bin". In bin mode, maturin typically derives the binary name from the Cargo.toml package name. If you need to control the binary/script name, verify this is the correct approach for maturin's bin bindings. The mismatch between project.name = "dapper-bin" and module-name = "dapper" may also cause confusion.
| module-name = "dapper" |
| keywords = ["source-code-analysis", "c", "c++", "python", "bash", "tree-sitter", "rust"] | ||
| classifiers = [ | ||
| "Programming Language :: Python :: 3", | ||
| "Operating System :: MacOS", |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The classifier "Operating System :: MacOS" is incomplete. The correct PyPI classifier should be "Operating System :: MacOS :: MacOS X" according to the PyPI classifier list.
| "Operating System :: MacOS", | |
| "Operating System :: MacOS :: MacOS X", |
| # 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 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The comment uses double hashes (##) which is inconsistent with the single hash (#) used for other comments in this file (lines 32, 34, 36). Consider using a single # for consistency.
| ## No [project.scripts] needed; maturin will generate the console entrypoint in bin mode | |
| # No [project.scripts] needed; maturin will generate the console entrypoint in bin mode |
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.