* Drop Python 3.9 support, require Python 3.10+ Python 3.9 reached end-of-life and the codebase uses PEP 604 union type syntax (str | None) which requires Python 3.10+. Changes: - Remove Python 3.9 from CI build matrix - Update requires-python to >=3.10 in all pyproject.toml files - Update classifiers to reflect supported Python versions (3.10-3.13) * Remove macos-13 from CI build matrix GitHub Actions deprecated macos-13 runner (brownout started Sept 2025, fully retired Dec 2025). See: https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/ * Add macos-15-large for Intel Mac builds Replace deprecated macos-13 with macos-15-large (x86_64 Intel) to continue supporting Intel Mac users. * Set MACOSX_DEPLOYMENT_TARGET=13.x for Intel builds Intel Mac wheels (macos-15-large) now target macOS 13.0/13.3 for backward compatibility, allowing macOS 13/14/15 Intel users to install pre-built wheels. * Remove Intel Mac builds (macos-15-large requires paid plan) Intel Mac users can build from source. This avoids: - Paid GitHub Actions runners (macos-15-large) - Complex cross-compilation setup * Add macos-15-intel for Intel Mac builds (free runner) Use macos-15-intel (free standard runner) instead of macos-15-large (paid). This provides Intel Mac wheel support until Aug 2027. - MACOSX_DEPLOYMENT_TARGET=13.0 for backward compatibility - Replaces deprecated macos-13 runner * Add macOS 26 (beta) to build matrix Add macos-26 (arm64) runner to the build matrix for testing future macOS compatibility. This is currently a beta runner that helps ensure wheels work on upcoming macOS versions. * Fix macos-15-intel deployment target The macos-15-intel runner runs macOS 15.7, so Homebrew libraries are built for macOS 14+. Setting MACOSX_DEPLOYMENT_TARGET=13.0 causes delocate to fail because system libraries require newer macOS. Fix by setting deployment target to 15.0 for macos-15-intel, matching the actual OS version. Intel Mac users will need macOS 15+. * Exclude macos-15-intel + Python 3.13 (no PyTorch wheels available)
55 lines
1.6 KiB
TOML
55 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "leann-core"
|
|
version = "0.3.5"
|
|
description = "Core API and plugin system for LEANN"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
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>=3.0.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",
|
|
# Keep transformers below 4.46: 4.46.0 adds Python 3.10-only return type syntax and
|
|
# breaks Python 3.9 environments.
|
|
"transformers>=4.30.0,<4.46",
|
|
"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,<4.46", # 4.46.0 switches to PEP 604 typing (int | None), breaks Py3.9
|
|
"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"]
|