From 874accebd95250586fb8fec0aa5b7feafdd7a284 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Tue, 13 Oct 2026 11:33:31 +1000 Subject: [PATCH] fix: pre-commit is a development tool, not a runtime dependency pre-commit was added to [project].dependencies in #98 along with the black hook, so every 'pip install spatialmath-python' also installs pre-commit and its dependency tree (virtualenv, identify, cfgv, nodeenv, ...). spatialmath never imports it. This is not just bloat. It makes the install fail anywhere a transitive pin conflicts: virtualenv 21.14.7 requires packaging>=26.3, and Pyodide (JupyterLite, in-browser) ships packaging 24.2, so micropip.install('spatialmath-python') raises ValueError. Downstream JupyterLite notebooks of the Robotics, Machine Vision and bdsim toolboxes are affected. Move it to the dev extra, which the CI workflows already install, and make the README's contributor instructions install it. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ccd4747f..02421c30 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,8 @@ git clone https://github.com/rai-opensource/spatialmath-python.git cd spatialmath-python pip install -e . # Optional: if you would like to contribute and commit code changes to the repository, +# install the development tools (including pre-commit) and set up the git hooks +# pip install -e .[dev] # pre-commit install ``` diff --git a/pyproject.toml b/pyproject.toml index 10b74a4c..01ddc21e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,6 @@ dependencies = [ "matplotlib", "ansitable", "typing_extensions", - "pre-commit", ] [project.urls] @@ -50,6 +49,7 @@ dependencies = [ [project.optional-dependencies] dev = [ + "pre-commit", "sympy", "pytest", "pytest-timeout",