Repository navigation
Commit 0bb35fa
fix: pre-commit is a development tool, not a runtime dependency (#250)
`pre-commit` was added to `[project].dependencies` in #98, alongside the
black hook. Nothing in spatialmath imports it, but every `pip install
spatialmath-python` has installed it, and its dependency tree
(virtualenv, identify, cfgv, nodeenv, ...), ever since. The hook config
was later removed (#153) and restored, but the runtime dependency
stayed.
**Why it matters beyond bloat:** it makes the install fail wherever a
transitive pin conflicts. `virtualenv` 21.14.7 now requires
`packaging>=26.3`, and Pyodide ships `packaging` 24.2, so in JupyterLite
/ in-browser notebooks `micropip.install("spatialmath-python")` raises
`ValueError: Requested 'packaging>=26.3', but packaging==24.2 is already
installed`. That breaks the in-browser demos of the Robotics, Machine
Vision and bdsim toolboxes, and it will break again whenever any dev
tool in that tree raises a floor.
**Change:** move `pre-commit` to the `dev` extra (CI already installs
`.[dev]`) and make the README's contributor instructions install it.
**Verified:** built the wheel and installed it with `micropip.install`
in Pyodide 0.27.6. Dependencies resolve, and `import spatialmath` and
`SE3.Rx(...)` work. Before the change the same install fails with the
error above.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent 5bd2e34 commit 0bb35fa
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments