From e5de66e2c24c319e73df22858b520fcfa269d300 Mon Sep 17 00:00:00 2001 From: Kota Yamaguchi Date: Tue, 26 Aug 2025 00:37:26 -0700 Subject: [PATCH] Use Development.Module component in CMake FindPython (#4549) Summary: This PR updates the CMake configuration for the Python extension. The current configuration specifies `Development` python component that includes the unnecessary `Development.Embed` sub-component. For a Python extension, only `Development.Module` component is required. The current configuration leads to a cmake build failure in the `manylinux` environment. https://cmake.org/cmake/help/latest/module/FindPython.html **Additional context** I found this issue while I was testing the `scikit-build-core` backend to build wheel packages in this repository: https://github.com/kyamagu/faiss-build Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4549 Reviewed By: junjieqi Differential Revision: D80952883 Pulled By: limqiying fbshipit-source-id: 793bc369fae8e9f1745f91d7f573f77494a1b886 --- faiss/python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt index b28723761..8190fbd64 100644 --- a/faiss/python/CMakeLists.txt +++ b/faiss/python/CMakeLists.txt @@ -265,7 +265,7 @@ target_include_directories(swigfaiss_sve PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(faiss_example_external_module PRIVATE ${PROJECT_SOURCE_DIR}/../..) find_package(Python REQUIRED - COMPONENTS Development NumPy + COMPONENTS Development.Module NumPy ) add_library(faiss_python_callbacks EXCLUDE_FROM_ALL