From 629a66c63537cc6e36020dbd42d39bc94efb5db9 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Sun, 7 Jun 2026 10:12:04 +0800 Subject: [PATCH] build: move vesin[torch] from core deps to the torch extra 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 breaks the conda-forge build. Move it under the torch optional-dependency extra (get_pt_requirement), so only deepmd-kit[torch] (pip) pulls it; the runtime already guards usage via is_vesin_torch_available(). --- backend/find_pytorch.py | 5 +++++ pyproject.toml | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/find_pytorch.py b/backend/find_pytorch.py index ca9ac4daf1..bccb2908f1 100644 --- a/backend/find_pytorch.py +++ b/backend/find_pytorch.py @@ -137,6 +137,11 @@ def get_pt_requirement(pt_version: str = "") -> dict: # https://github.com/pytorch/pytorch/commit/7e0c26d4d80d6602aed95cb680dfc09c9ce533bc else "torch>=2.1.0", "e3nn>=0.5.9", + # O(N) cell-list neighbor list for fast Python/ASE inference; the + # torch bindings (vesin-torch) ship only as a PyPI extra, so keep it + # under the torch extra rather than the core deps (conda-forge has + # vesin but not vesin-torch). + "vesin[torch]", *mpi_requirement, *cibw_requirement, ], diff --git a/pyproject.toml b/pyproject.toml index f2a89155fa..35fc0fdb18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,8 +58,6 @@ dependencies = [ 'array-api-compat', 'lmdb', 'msgpack', - # O(N) cell-list neighbor list (vesin.torch) for fast Python/ASE inference - 'vesin[torch]', ] requires-python = ">=3.10" keywords = ["deepmd"]