Commit 99c1ece
build: move vesin[torch] to the torch extra (fix conda-forge) (deepmodeling#5501)
## Summary
`vesin`'s torch bindings ship as a separate PyPI package (`vesin-torch`,
pulled in by the `vesin[torch]` extra). **conda-forge packages `vesin`
but not `vesin-torch`**, so listing `vesin[torch]` in the **core**
`dependencies` (added in deepmodeling#5491) breaks the conda-forge build of the base
`deepmd-kit` package.
This moves `vesin[torch]` out of the core dependencies and into the
**`torch` optional-dependency extra**
(`backend/find_pytorch.get_pt_requirement`), so only `deepmd-kit[torch]`
(pip) pulls it. The neighbor-list runtime already guards usage via
`is_vesin_torch_available()`, and `nlist_backend="auto"` falls back to
the native builder when vesin is absent, so this is behavior-preserving
for installs that don't ship the torch extra.
## Changes
- `pyproject.toml`: drop `vesin[torch]` from core `dependencies`.
- `backend/find_pytorch.py`: add `vesin[torch]` to the `torch` extra.
## Known limitations
- No automated test covers the build-backend's generated extras; the
change is verified by inspection (the `pip install deepmd-kit[torch]`
resolution and the conda-forge recipe build are not exercised in CI
here).
- When torch is not requested, the `torch` extra is empty and vesin is
not installed (intended).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Adjusted dependency configuration for improved package management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>1 parent 2e3117e commit 99c1ece
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
0 commit comments