Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
As a result, the IMPORTED_LOCATION_RELEASE property of the SABIModule target was empty, instead of pointing to the Python runtime library for the Stable Application Binary Interface.
In some situations, like cross-compilation, it can be required to search for
the host python interpreter as well as the cross-compilation development
artifacts.
By managing different prefixes for the artifacts, multiple and independent
searches can be achieved.
To enable to locate development artifacts, in the context of virtual
environment, without requiring Interpreter component, rely on the
configuration file pyvenv.cfg.
Fixes: #26505
10abd2ac5a FindPython: ensure a usable environment is set for the free threaded Python
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9775
Define the `Python_DEFINITIONS` variable for the support of free
threaded Python developments on Windows.
This is a complement to commit 9a0dee7257 (FindPython: Add support for
free threaded python, 2024-05-30).
Fix commit df551ee538 (FindPython: fix NumPy detection when Intel MKL
library is installed, 2024-03-20, v3.30.0-rc1~361^2) by setting
`MKL_ENABLE_INSTRUCTIONS` to `SSE4_2`, but only if
`MKL_ENABLE_INSTRUCTIONS` is not set in the calling environment.
Fixes: #26240
Add the following variables:
* Python_EXECUTABLE_DEBUG
* Python_INTERPRETER
* Python_DEBUG_POSTFIX
and target Python::InterpreterDebug.
python_add_library() command Manage DEBUG_POSTFIX target property based
on the value of Python_DEBUG_POSTFIX variable.
Fixes: #25874
In an environment where both NumPy and a recent Intel MKL library are
installed, the detection of numpy include directory fails because a
'import numpy' outputs a MKL related warning message on stdout...
(namely "Intel MKL WARNING: Support of Intel(R) Advanced Vector
Extensions (Intel(R) AVX) enabled only processors has been deprecated.
Intel oneAPI Math Kernel Library will use Intel(R) Streaming SIMD
Extensions 4.2 (Intel(R) SSE4.2) instructions instead.")
I've successfully tested the workaround mentioned at
https://github.com/numpy/numpy/issues/23775#issuecomment-1923327310
which consists in setting the MKL_ENABLE_INSTRUCTIONS=SSE4_2 environment
before importing numpy, hence this proposed workaround.
* add more possible directories for include file search
* enhance version detection from library and include files
* search for file pypy_decl.h when PyPy.h is not defined