Skip to content

Conversation

@nightlark
Copy link
Collaborator

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.

…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>
@nightlark nightlark added enhancement New feature or request rust Pull requests that update Rust code labels Dec 4, 2025
@nightlark nightlark requested a review from Copilot December 4, 2025 00:51
Copy link

Copilot AI left a 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"
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
description = "pip installable dapper binaries"
description = "pip-installable dapper binaries"

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +24
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",
]
Copy link

Copilot AI Dec 4, 2025

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.

Copilot uses AI. Check for mistakes.
# 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"
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
module-name = "dapper"

Copilot uses AI. Check for mistakes.
keywords = ["source-code-analysis", "c", "c++", "python", "bash", "tree-sitter", "rust"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: MacOS",
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",

Copilot uses AI. Check for mistakes.
# 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
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
## 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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants