Files
LEANN/pyproject.toml
Andy Lee dab154a77b fix: disable Faiss Python bindings to avoid CMake Python finding issues
- Set FAISS_ENABLE_PYTHON to OFF since we use our own Cython bindings
- This avoids the CMake Python finding issues in manylinux environments
- Simplify CMakeLists.txt by removing unnecessary Python finding logic
- Keep swig installation for other potential uses
2025-07-25 10:33:31 -07:00

87 lines
2.0 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[build-system]
requires = ["setuptools>=61.0", "cmake>=3.24"]
build-backend = "setuptools.build_meta"
[project]
name = "leann-workspace"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"leann-core",
"leann-backend-hnsw",
"numpy>=1.26.0",
"torch",
"tqdm",
"flask",
"flask_compress",
"datasets>=2.15.0",
"evaluate",
"colorama",
"boto3",
"protobuf==4.25.3",
"sglang",
"ollama",
"requests>=2.25.0",
"sentence-transformers>=2.2.0",
"openai>=1.0.0",
"PyPDF2>=3.0.0",
"llama-index>=0.12.44",
"llama-index-readers-docling",
"llama-index-node-parser-docling",
"ipykernel==6.29.5",
"msgpack>=1.1.1",
"llama-index-vector-stores-faiss>=0.4.0",
"llama-index-embeddings-huggingface>=0.5.5",
"mlx>=0.26.3; sys_platform == 'darwin'",
"mlx-lm>=0.26.0; sys_platform == 'darwin'",
"psutil>=5.8.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"black>=23.0",
"ruff>=0.1.0",
"matplotlib",
"huggingface-hub>=0.20.0",
]
diskann = [
"leann-backend-diskann",
]
[tool.setuptools]
py-modules = []
[tool.uv.sources]
leann-core = { path = "packages/leann-core", editable = true }
leann-backend-diskann = { path = "packages/leann-backend-diskann", editable = true }
leann-backend-hnsw = { path = "packages/leann-backend-hnsw", editable = true }
[tool.cibuildwheel]
# 跳过32位和PyPy构建
skip = "*-win32 *-manylinux_i686 pp* *musllinux*"
# 使用manylinux2014以获得最大兼容性支持GLIBC 2.17
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
# Linux系统依赖
[tool.cibuildwheel.linux]
before-all = """
yum install -y epel-release
yum install -y gcc-c++ boost-devel zeromq-devel openblas-devel cmake3 python3-devel
ln -sf /usr/bin/cmake3 /usr/bin/cmake
"""
# macOS系统依赖
[tool.cibuildwheel.macos]
before-all = "brew install boost zeromq openblas cmake libomp"
# 环境变量配置
[tool.cibuildwheel.environment]
CMAKE_BUILD_PARALLEL_LEVEL = "8"