fix(dev): skip lancedb on macOS Intel and guard optional import (#496)
Add a PEP 508 marker so lancedb is not installed on darwin/x86_64, wrap the LanceDB vector store import in try/except for a clear config error, and regenerate uv.lock. Branch rebased onto upstream/main; prior src/utils/clients.py CI tweak is obsolete because LLM wiring moved under src/llm/. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
672f4c6637
commit
24f7a2cbd2
|
|
@ -32,7 +32,7 @@ dependencies = [
|
|||
"typing-extensions>=4.11.0",
|
||||
"json-repair>=0.49.0",
|
||||
"turbopuffer>=1.8.1",
|
||||
"lancedb>=0.25.3",
|
||||
"lancedb>=0.25.3; sys_platform != \"darwin\" or platform_machine != \"x86_64\"",
|
||||
"pyarrow>=19.0.0",
|
||||
"redis>=7.0.0,<8.0.0",
|
||||
"cashews[redis]==7.5.0",
|
||||
|
|
|
|||
|
|
@ -202,7 +202,16 @@ def _create_store_by_type(store_type: str) -> VectorStore:
|
|||
|
||||
return TurbopufferVectorStore()
|
||||
elif store_type == "lancedb":
|
||||
from src.vector_store.lancedb import LanceDBVectorStore
|
||||
try:
|
||||
from src.vector_store.lancedb import LanceDBVectorStore
|
||||
except ImportError as exc:
|
||||
raise RuntimeError(
|
||||
"VECTOR_STORE.TYPE is set to 'lancedb', but the 'lancedb' package "
|
||||
"is not installed (for example on macOS Intel, where it is omitted "
|
||||
"from dependencies because PyPI has no wheel). "
|
||||
"Use TYPE 'pgvector' or 'turbopuffer', or install lancedb manually. "
|
||||
f"Original import error: {exc}"
|
||||
) from exc
|
||||
|
||||
return LanceDBVectorStore()
|
||||
else:
|
||||
|
|
|
|||
4
uv.lock
4
uv.lock
|
|
@ -1171,7 +1171,7 @@ dependencies = [
|
|||
{ name = "greenlet" },
|
||||
{ name = "httpx" },
|
||||
{ name = "json-repair" },
|
||||
{ name = "lancedb" },
|
||||
{ name = "lancedb", marker = "platform_machine != 'x86_64' or sys_platform != 'darwin'" },
|
||||
{ name = "langfuse" },
|
||||
{ name = "nanoid" },
|
||||
{ name = "openai" },
|
||||
|
|
@ -1225,7 +1225,7 @@ requires-dist = [
|
|||
{ name = "greenlet", specifier = ">=3.0.3" },
|
||||
{ name = "httpx", specifier = ">=0.27.0" },
|
||||
{ name = "json-repair", specifier = ">=0.49.0" },
|
||||
{ name = "lancedb", specifier = ">=0.25.3" },
|
||||
{ name = "lancedb", marker = "platform_machine != 'x86_64' or sys_platform != 'darwin'", specifier = ">=0.25.3" },
|
||||
{ name = "langfuse", specifier = ">=3.3.2" },
|
||||
{ name = "nanoid", specifier = ">=2.0.0" },
|
||||
{ name = "openai", specifier = ">=1.99.7" },
|
||||
|
|
|
|||
Loading…
Reference in New Issue