- Set MACOSX_DEPLOYMENT_TARGET=11.0 for macOS builds - Add pyzmq to test requirements to use pre-built wheels - Configure deployment target in both workflow and pyproject.toml - Skip ARM64 tests on GitHub Actions to avoid cross-compilation issues
89 lines
2.1 KiB
TOML
89 lines
2.1 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*"
|
||
|
||
# 使用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"
|
||
# 设置macOS最小版本
|
||
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0", CMAKE_OSX_DEPLOYMENT_TARGET = "11.0" }
|
||
|
||
# 环境变量配置
|
||
[tool.cibuildwheel.environment]
|
||
CMAKE_BUILD_PARALLEL_LEVEL = "8"
|