Skip to content
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

pyproject: Use hatchling as build system #39

Merged
merged 5 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
run: cargo build
- name: Build Python module
run: |
pip install --user maturin
pip install . --user
pip install --user maturin hatch
hatch run dev:install
- name: Check Python integration
run: python examples/python/main.py
run: hatch run dev:examples/python/main.py
- name: Check C++ integration
run: |
cd examples/cpp
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[build-system]
requires = ["maturin>=0.14,<0.15"]
build-backend = "maturin"
requires = ["maturin>=1.0.1", "hatchling>=1.21.1"]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "Cargo.toml"

[project]
name = "bluerobotics_navigator"
Expand All @@ -23,6 +26,9 @@ Repository = "https://github.com/bluerobotics/navigator-lib"
[tool.maturin]
features = ["python"]

[tool.hatch.build.targets.wheel]
packages = ["bluerobotics_navigator"]

[tool.hatch.envs.dev]
dependencies = [
"maturin >=1.0.1",
Expand All @@ -34,5 +40,6 @@ dependencies = [
]

[tool.hatch.envs.dev.scripts]
build = "maturin build"
install = "maturin develop"
build-doc = "install && sphinx-build ./docs/source docs/_build"
Loading