From 5b7598c8bb93b817e520acdbf147c3f27693591b Mon Sep 17 00:00:00 2001 From: Andy Neff Date: Sat, 30 Nov 2024 04:16:06 -0500 Subject: [PATCH] CMakeLists.txt: Use Development.Module for python (#394) The "Development" component of Python3 needs more files than we care about (e.g. `libpython3.xx.so`). However when compiling a module, we need fewer files, (e.g. the headers). To support this distinction, [cmake added `Development.Modules`](https://cmake.org/cmake/help/latest/module/FindPython3.html) so that this will work in more environments (e.g. docker image `quay.io/pypa/manylinux_2_28_x86_64`) --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ddc211b..d6fb81e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.18) project(s2-geometry VERSION 0.12.0) @@ -67,7 +67,7 @@ if (WITH_PYTHON) find_package(SWIG 4.0) # Use Python3_ROOT_DIR to help find python3, if the correct location is not # being found by default. - find_package(Python3 COMPONENTS Interpreter Development) + find_package(Python3 COMPONENTS Interpreter Development.Module) endif() if (MSVC)