[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1026104: why does python3-numpy depend on python3.11?



On Wed, 11 Jan 2023 11:02:42 +0100 Joachim Wuttke <j.wuttke@fz-juelich.de> wrote:
So do I understand correctly:
- If I continue to use a local CMake installation, just I have to supply the
   extra command-line options
     -DPython3_FIND_STRATEGY=LOCATION -DPython3_FIND_UNVERSIONED_NAMES=FIRST
   which are available from unpatched CMake. They available in CMake versions
   3.25 and later?

Yes. The options work with CMake 3.15 or later. If CMP0094 is set to
NEW, either explicitly or by `cmake_minimum_required(VERSION 3.15)`,
the FIND_STRATEGY will be correct already and needs not be
overridden [1].

Note that the variables above apply to `find_package(Python3)`
specifically. If you use the generic `find_package(Python)`, you
need to set Python_FIND_STRATEGY and Python_FIND_UNVERSIONED_NAMES
instead.

- If I return to a fully Debian based system, there will be no more transient
   problems with numpy vs multi Python minor because the Debian-patched CMake
   will handle them? It will do so by inserting the aformentioned -D options?

Yes. The Debian patch changes the default values for these
variables [2]. Therefore, the Debian CMake package should always to
pick the current default Python interpreter unless prevented by a
conflicting version requirement such as `find_package(Python3 3.9
EXACT)`.


Cheers
Timo

[1] https://cmake.org/cmake/help/latest/policy/CMP0094.html
[2] Well, there is an additional tweak to make the deprecated
`find_package(PythonInterp)` work, but that does not affect you.

--
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

Attachment: signature.asc
Description: PGP signature


Reply to: