fix: add missing dependencies for CI builds

- Add libomp for macOS to fix OpenMP linking error
- Add python3-devel for Linux (though may not be needed in manylinux)
- Install numpy before building to satisfy faiss CMake requirements
- Add before-build configuration to cibuildwheel
This commit is contained in:
Andy Lee
2025-07-25 10:20:02 -07:00
parent fb53ed9a0e
commit 0543cc9816
2 changed files with 33 additions and 6 deletions

View File

@@ -73,10 +73,17 @@ manylinux-aarch64-image = "manylinux2014"
[tool.cibuildwheel.linux]
before-all = """
yum install -y epel-release
yum install -y gcc-c++ boost-devel zeromq-devel openblas-devel cmake3
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"
before-all = "brew install boost zeromq openblas cmake libomp"
# 环境变量配置
[tool.cibuildwheel.environment]
CMAKE_BUILD_PARALLEL_LEVEL = "8"
# 构建前安装必要的Python包
before-build = "pip install numpy"