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
This commit is contained in:
Andy Lee
2025-07-25 10:03:23 -07:00
parent 5eb893c62b
commit a73194c3f6
5 changed files with 141 additions and 88 deletions

View File

@@ -16,4 +16,12 @@ wheel.packages = ["leann_backend_diskann"]
editable.mode = "redirect"
cmake.build-type = "Release"
build.verbose = true
build.tool-args = ["-j8"]
build.tool-args = ["-j8"]
wheel.exclude = ["CMakeLists.txt", "src", "third_party/**", "*.o", "*.so"]
sdist.include = ["CMakeLists.txt", "src", "third_party", "leann_backend_diskann/*.txt"]
[tool.scikit-build.cmake.define]
CMAKE_BUILD_PARALLEL_LEVEL = "8"
# Help CMake find Python in cibuildwheel environments
Python_FIND_VIRTUALENV = "ONLY"
Python3_FIND_VIRTUALENV = "ONLY"

View File

@@ -16,12 +16,15 @@ dependencies = [
]
[tool.scikit-build]
wheel.packages = ["leann_backend_hnsw"]
editable.mode = "redirect"
cmake.build-type = "Release"
build.verbose = true
build.tool-args = ["-j8"]
wheel.exclude = ["CMakeLists.txt", "src", "third_party"]
sdist.include = ["CMakeLists.txt", "src", "third_party", "leann_backend_hnsw/*.txt"]
cmake.args = ["-DCMAKE_BUILD_TYPE=Release"]
# 确保 CMake 可以找到系统库
cmake.verbose = true
# CMake definitions to optimize compilation
[tool.scikit-build.cmake.define]
CMAKE_BUILD_PARALLEL_LEVEL = "8"
CMAKE_BUILD_PARALLEL_LEVEL = "8"
# Help CMake find Python in cibuildwheel environments
Python_FIND_VIRTUALENV = "ONLY"
Python3_FIND_VIRTUALENV = "ONLY"