[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "leann-core"
version = "0.3.0"
description = "Core API and plugin system for LEANN"
readme = "README.md"
requires-python = ">=3.9"
license = { text = "MIT" }

# All required dependencies included
dependencies = [
    "numpy>=1.20.0",
    "tqdm>=4.60.0",
    "psutil>=5.8.0",
    "pyzmq>=23.0.0",
    "msgpack>=1.0.0",
    "torch>=2.0.0",
    "sentence-transformers>=2.2.0",
    "llama-index-core>=0.12.0",
    "llama-index-readers-file>=0.4.0",  # Essential for document reading
    "llama-index-embeddings-huggingface>=0.5.5",  # For embeddings
    "python-dotenv>=1.0.0",
    "openai>=1.0.0",
    "huggingface-hub>=0.20.0",
    "transformers>=4.30.0",
    "requests>=2.25.0",
    "accelerate>=0.20.0",
    "PyPDF2>=3.0.0",
    "pymupdf>=1.23.0",
    "pdfplumber>=0.10.0",
    "nbconvert>=7.0.0",  # For .ipynb file support
    "gitignore-parser>=0.1.12",  # For proper .gitignore handling
    "mlx>=0.26.3; sys_platform == 'darwin' and platform_machine == 'arm64'",
    "mlx-lm>=0.26.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
]

[project.optional-dependencies]
colab = [
    "torch>=2.0.0,<3.0.0",  # Limit torch version to avoid conflicts
    "transformers>=4.30.0,<5.0.0",  # Limit transformers version
    "accelerate>=0.20.0,<1.0.0",  # Limit accelerate version
]

[project.scripts]
leann = "leann.cli:main"
leann_mcp = "leann.mcp:main"

[tool.setuptools.packages.find]
where = ["src"]
