From 5af91c73252e1569380bc244dcd4fa98bc3a1c3d Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Mon, 17 Aug 2026 21:53:36 +0200 Subject: [PATCH] [cmake] Require only Python Development.Module for the extension build --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03eaeffa..83cbedbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,15 @@ set(CPPINTEROP_GIT_TAG "8d624c621a4b95e36ff73ac708c85a768287478f" CACHE STRING " set(CPPINTEROP_SOURCE_DIR "" CACHE PATH "Override default CppInterOp built by ExternalProject_Add, with a path to local CppInterOp source") +# The full Development component requires libpython, which manylinux +# images do not ship and extension modules do not need. set(Python_FIND_VIRTUALENV ONLY) -find_package(Python COMPONENTS Interpreter Development) +find_package(Python COMPONENTS Interpreter Development.Module) if(NOT Python_FOUND) set(Python_FIND_VIRTUALENV STANDARD) - find_package(Python COMPONENTS Interpreter Development) + find_package(Python COMPONENTS Interpreter Development.Module) endif() -if(NOT Python_Development_FOUND) +if(NOT Python_Development.Module_FOUND) message(FATAL_ERROR "Python development headers not found") endif()