docs(python): declare and enforce 64-bit-only Python support (#576)

This commit is contained in:
Jalin Wang
2026-07-13 11:54:10 +08:00
committed by GitHub
parent 4de76fdbde
commit 1b694706cb
4 changed files with 13 additions and 3 deletions
+9
View File
@@ -20,6 +20,15 @@ from typing import TYPE_CHECKING
if TYPE_CHECKING:
from importlib.metadata import PackageNotFoundError
# zvec ships a native C++ extension that is only built and tested for 64-bit
# CPython. A 32-bit interpreter would fail to load the extension with an
# obscure error, so fail fast here with an actionable message.
if sys.maxsize <= 2**32:
raise ImportError(
"zvec requires a 64-bit Python interpreter; "
"the current interpreter is 32-bit and is not supported."
)
# Register the wheel-bundled jieba dict dir so `import zvec` alone makes
# the jieba FTS tokenizer usable. Users can still override via