fix(python): only bundle the DiskANN plugin where it is supported (#510)
This commit is contained in:
@@ -26,6 +26,14 @@ dist
|
||||
html
|
||||
*.lcov.info
|
||||
|
||||
# Compiled extension modules must never live in the source package: they are
|
||||
# built by CMake and installed into the wheel. A stray copy left here gets
|
||||
# bundled verbatim by scikit-build's wheel.packages and breaks the wheel
|
||||
# (e.g. a stale binary with the wrong macOS deployment target).
|
||||
python/zvec/*.so
|
||||
python/zvec/*.dylib
|
||||
python/zvec/*.pyd
|
||||
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
|
||||
+8
-3
@@ -183,9 +183,14 @@ if(BUILD_PYTHON_BINDINGS)
|
||||
# function. The Python extension resolves the module next to _zvec.so
|
||||
# (see the $ORIGIN rpath in src/binding/python/CMakeLists.txt); the
|
||||
# module must therefore be installed alongside _zvec.so in the wheel.
|
||||
# The target exists only on platforms where DiskAnn is buildable
|
||||
# (currently Linux x86_64 with libaio).
|
||||
if(TARGET core_knn_diskann)
|
||||
#
|
||||
# Gate on DISKANN_SUPPORTED, not on the target's existence: on unsupported
|
||||
# platforms (e.g. macOS / ARM64) the core_knn_diskann target is still
|
||||
# defined, but built from an empty stub (src/core/algorithm/CMakeLists.txt)
|
||||
# with zero exported symbols and a runtime load path compiled out
|
||||
# (#if DISKANN_SUPPORTED). Shipping that stub is pure dead weight, so it is
|
||||
# only packaged where DiskAnn is real — currently Linux x86_64 with libaio.
|
||||
if(DISKANN_SUPPORTED)
|
||||
install(TARGETS core_knn_diskann LIBRARY DESTINATION ${ZVEC_PY_INSTALL_DIR}
|
||||
COMPONENT python)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user