Hi Joachim, On Wed, 30 Nov 2022 17:22:08 +0100 Joachim Wuttke <j.wut...@fz-juelich.de> wrote:
Why does python3-numpy under bookworm, since a few days, depend on python3.10 *and* on python3.11?This breaks our software projects that combine C++ with Python. The CMake command find_package(Python3 3.${version_minor_min} REQUIRED COMPONENTS Interpreter Development NumPy) fails with error message CMake Error at /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python3 (missing: Development NumPy Development.Module Development.Embed) (found suitable version "3.11.0", minimum required is "3.7") Call Stack (most recent call first): /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.23/Modules/FindPython/Support.cmake:3192 (find_package_handle_standard_args) /usr/local/share/cmake-3.23/Modules/FindPython3.cmake:490 (include) CMakeLists.txt:154 (find_package)
CMake maintainer here who stumbled upon your bug report. This has been a known issue with upstream CMake looking for the newest available Python version by default. It has been addressed in Debian [1], but seeing that /usr/local/share/cmake-3.23 shows up in the callstack above, I suspect that you are not using the Debian version of CMake. For the record, you can work around the issue with the extra command line options -DPython3_FIND_STRATEGY=LOCATION -DPython3_FIND_UNVERSIONED_NAMES=FIRST I recommend that you switch to the Debian CMake package, though. Cheers Timo [1] https://sources.debian.org/src/cmake/3.25.1-1/debian/patches/0001-Prefer-default-Python-version.patch/ -- ⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮ ⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │ ⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │ ⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
signature.asc
Description: PGP signature