1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-11 23:57:42 +08:00

143 Commits

Author SHA1 Message Date
Marc Chevrier
e9770a315d FindPython: Support for multiple searches in same directory
This is a complement to commit 9b0510fa57 (FindPython: add support for
multiple searches in same directory, 2025-01-05).
2025-02-13 09:36:43 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
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`.
2025-01-30 08:53:12 -05:00
Mathieu Flament
1995557885 FindPython : fix a misspelled variable name in __python_import_library macro.
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.
2025-01-29 01:09:17 +01:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King
98a59ba8ad CMP0012: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
d77a7e8d1c CMP0007: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Marc Chevrier
9b0510fa57 FindPython: add support for multiple searches in same directory
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.
2025-01-11 15:47:06 +01:00
Marc Chevrier
b1f0c5e476 FindPython: enhance artifacts consistency
Avoid to rely on _Python_EXECUTABLE variable if the Interpreter component
is not part of the current search.
2025-01-01 17:29:21 +01:00
Marc Chevrier
11aff3c490 FindPython: enhance Development artifacts lookup in virtual environment
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
2024-12-12 13:53:11 +01:00
Marc Chevrier
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases
Fixes: #26493
2024-12-02 17:37:18 +01:00
Miro Hrončok
be958c8f35 FindPython: Add support for Python 3.14 2024-10-17 20:04:25 -04:00
Marc Chevrier
f885b007b9 FindPython: ensure all ABI are searched by default
Fixes: #26279
2024-09-12 19:22:40 +02:00
Brad King
a0317334ae Merge topic 'FindPython-free-threaded-python' into release-3.30
10abd2ac5a FindPython: ensure a usable environment is set for the free threaded Python

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9775
2024-08-27 09:42:37 -04:00
Marc Chevrier
10abd2ac5a FindPython: ensure a usable environment is set for the free threaded Python
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).
2024-08-27 09:27:35 -04:00
Even Rouault
516124ea23 FindPython: fix regression of NumPy detection with Intel MKL library
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
2024-08-26 10:27:55 -04:00
Marc Chevrier
c25df125e1 FindPython: Fix usage of cached variable _Python_EXECUTABLE_DEBUG
Fixes: #26163
2024-07-26 14:36:20 +02:00
Marc Chevrier
9a0dee7257 FindPython: Add support for free threaded python
Fixes: #26016
2024-06-04 18:14:35 +02:00
Marc Chevrier
c164404b2e FindPython: On Windows, Enhance python debug version support
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
2024-05-09 19:08:47 +02:00
Juan Ramos
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
2024-03-29 13:51:59 -07:00
Even Rouault
df551ee538
FindPython: fix NumPy detection when Intel MKL library is installed
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.
2024-03-21 16:07:49 +01:00
Brad King
ab379e5054 Merge topic 'FindPython-3.13'
dfab044c44 FindPython: add support for Python 3.13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8712
2023-08-16 09:42:53 -04:00
Vasily Ryabov
dfab044c44 FindPython: add support for Python 3.13
Python 3.13.0a0 can be built from main branch of python/cpython though
there were no official releases yet.
2023-08-15 09:39:43 -04:00
Marc Chevrier
d6b9af5f91 FindPython: enhance MinGW support
Ensure python-config script can be used.
2023-08-05 14:23:43 +02:00
Brad King
653754794a Merge topic 'FindPython-Debian-workaround'
b02f3872d0 FindPython: Restore Python_SITE* values for versions below 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8672
2023-08-01 09:22:31 -04:00
Marc Chevrier
b02f3872d0 FindPython: Restore Python_SITE* values for versions below 3.10
Debian based distributions have a buggy sysconfig package.
So, rely on distutils.sysconfig if python version is less than 3.10.

Fixes: #25135
2023-07-31 15:00:44 -04:00
Marc Chevrier
9b45210b05 FindPython: Add tests for IronPython v3 2023-06-29 17:07:56 +02:00
Marc Chevrier
988ac305bd FindPython: update for distutils module deprecation
Fixes: #24956
2023-06-05 11:22:03 +02:00
Brad King
442ca1a59c Merge topic 'FindPython-fix-launcher-typo'
31faf3945f FindPython: fix interpreter launcher variable spelling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8487
2023-05-18 09:19:20 -04:00
Ben Boeckel
31faf3945f FindPython: fix interpreter launcher variable spelling
Reported-by: Johannes (#cmake Slack)
2023-05-17 07:02:07 -04:00
Marc Chevrier
9913c28ebb FindPython: Add Windows/ARM support
Fixes: #24587
2023-03-26 10:58:12 +02:00
Marc Chevrier
4c902d675b FindPython: ensure Stable ABI is correctly handled
Fixes: #24610
2023-03-20 08:10:53 -04:00
Marc Chevrier
764441e672 FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching
Fixes: #24556
2023-03-01 12:34:13 +01:00
Brad King
caf5aea63f Merge topic 'FindPython-CMP0007-NEW'
486b3c0850 FindPython: Policy CMP0007 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8104
2023-01-24 09:19:16 -05:00
Marc Chevrier
486b3c0850 FindPython: Policy CMP0007 must be set to NEW
Fixes: #24306
2023-01-21 15:08:21 +01:00
Marc Chevrier
77d734aede FindPython: add support for Stable ABI
Fixes: #24141
2022-11-29 16:48:08 +01:00
Marc Chevrier
328d847f70 FindPython: enhance SOABI computation
Fixes: #24121, #23651
2022-11-15 16:54:44 +01:00
Marc Chevrier
71bdf78bda FindPython: remove unnecessary components interdependence
Fixes: #23716
2022-07-19 16:22:42 +02:00
Brad King
3fcdc98b7d Merge topic 'FindPython-multiple-queries'
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7410
2022-06-28 09:22:55 -04:00
Marc Chevrier
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS
Ensure that multiple queries with different COMPONENTS specified in
different sub-directories are fully supported.
2022-06-27 13:16:29 -04:00
Marc Chevrier
e8e5af0278 FindPython: enhance search criterias
Use VALIDATOR option of find_* commands to add more criterias to the search:
* version
* architecture

Fixes: #22319
2022-06-22 16:47:56 +02:00
Marc Chevrier
0201530bdb FindPython: enhance windows registry handling 2022-06-21 22:52:02 +02:00
Marc Chevrier
8de50bae84 FindPython*: enhance interpreter lookup
Fixes: #23588
2022-06-05 14:44:04 +02:00
Michael Hirsch
ca2877c039 FindPython: add support for Python 3.12 2022-05-12 10:55:11 -04:00
Marc Chevrier
fff8d5b212 FindPython: fix typo error
Fixes: #23476
2022-05-03 10:46:13 +02:00
Marc Chevrier
5440eafaae FindPython: Add support for pypy v7.3.9 and uppers
Library name versioning has changed.

Fixes: #23439
2022-04-20 15:29:50 +02:00
Marc Chevrier
2834cea155 FindPython: fix various problems using pypy interpreters
* 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
2022-03-17 14:53:40 +01:00
Tomáš Hrnčiar
43844c5d82 FindPython: Add support for Python 3.11 2021-12-07 12:41:01 -05:00
Marc Chevrier
2636ad5045 FindPython: Ensure homebrew on Mac M1 is used
Fixes: #22581
2021-09-03 14:59:52 +02:00
Brad King
fc76273519 Merge topic 'FindPython-fix-variable-handling'
754f4f6876 FindPython: fix erroneous variable handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5816
2021-02-16 12:07:17 -05:00
Marc Chevrier
754f4f6876 FindPython: fix erroneous variable handling
Fixes: #21817
2021-02-16 10:46:28 -05:00