Files
LEANN/pyproject.toml
Andy Lee a73194c3f6 feat: simplify build using cibuildwheel with standard configuration
- Add Python_FIND_VIRTUALENV hints to pyproject.toml for CMake
- Create standardized cibuildwheel workflow using manylinux_2_28
- Simplify system dependency installation
- Add global cibuildwheel configuration in root pyproject.toml
- Create streamlined test workflow for manylinux compatibility
2025-07-25 10:03:23 -07:00

86 lines
2.0 KiB
TOML

[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*"
# 使用更新的manylinux镜像以获得更好的兼容性
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
# Linux系统依赖
[tool.cibuildwheel.linux]
before-all = """
dnf install -y epel-release
dnf install -y gcc-c++ boost-devel zeromq-devel openblas-devel cmake
"""
# macOS系统依赖
[tool.cibuildwheel.macos]
before-all = "brew install boost zeromq openblas cmake"
# Windows系统依赖
[tool.cibuildwheel.windows]
before-all = "choco install cmake -y"