From 3de997b2de5b415d0b76a6950aff0fce2b0b14d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 4 Aug 2023 00:30:10 -0300 Subject: [PATCH 1/5] pyproject: Use hatchling as build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9cd9df236..87a7a2d59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["maturin>=0.14,<0.15"] -build-backend = "maturin" +requires = ["maturin>=1.0.1", "hatchling>=1.21.1"] +build-backend = "hatchling.build" [project] name = "bluerobotics_navigator" From d4989ff553e8f9125113d23734c0dbfcf8553e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 4 Aug 2023 00:32:58 -0300 Subject: [PATCH 2/5] pyproject: Use Cargo.toml as version source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 87a7a2d59..60443aa98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,9 @@ requires = ["maturin>=1.0.1", "hatchling>=1.21.1"] build-backend = "hatchling.build" +[tool.hatch.version] +path = "Cargo.toml" + [project] name = "bluerobotics_navigator" requires-python = ">=3.7" From 62d0ddab67db18113d6335ec7f92b50657782c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 4 Aug 2023 00:33:12 -0300 Subject: [PATCH 3/5] pyproject: Add build command to generate binds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 60443aa98..da02284db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,5 +37,6 @@ dependencies = [ ] [tool.hatch.envs.dev.scripts] +build = "maturin build" install = "maturin develop" build-doc = "install && sphinx-build ./docs/source docs/_build" From 5eb0c4845ff372c026bcb2c684c1592aca319d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 4 Mar 2024 10:07:48 -0300 Subject: [PATCH 4/5] pyproject: Add target wheel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index da02284db..bcc863957 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,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", From 7783ad30bde714ea97000c9835ea5c10526d1ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 4 Mar 2024 10:11:13 -0300 Subject: [PATCH 5/5] ci: Use hatch to build python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 1ef2d183f..6f319dcd1 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -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