Commit Graph
177 Commits
Author SHA1 Message Date
Marc Chevrier 2f9f2557e3 Merge branch 'backport-FindPython-fix-CROSSCOMPILING-CMP0190-OLD' into FindPython-fix-CROSSCOMPILING-CMP0190-OLD 2026-08-10 14:56:04 +02:00
Marc Chevrier 44fabaa32d FindPython: fix CROSSCOMPILING with CMP0190=OLD
Fixes: #28029
2026-08-10 14:52:04 +02:00
Marc Chevrier 7b74c14b02 FindPython: fix CROSSCOMPILING with CMP0190=OLD 2026-08-10 14:28:15 +02:00
Marc Chevrier 8c0bb8ee95 FindPython: Add support for python specific crosscompiling emulator
Fixes: #27996
2026-08-06 17:57:26 +02:00
Brad King 17eb093d35 Merge topic 'FindPython-fix-ARCHITECTURE_ID-check'
7fc60e733d FindPython: Fix CMAKE_LANG_COMPILER_ARCHITECTURE_ID check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12362
2026-08-04 09:00:30 -04:00
Marc Chevrier 7fc60e733d FindPython: Fix CMAKE_LANG_COMPILER_ARCHITECTURE_ID check
Fixes: #28012
2026-08-02 15:54:33 +02:00
Marc Chevrier 91e227939c FindPython: Add Python_SOSABI_PLATFORM variable
This variable gives the SABI module extension which include the
platform triplet.

Fixes: #27997
2026-07-31 16:41:01 +02:00
Marc Chevrier 84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows
Fixes: #27969
2026-07-26 17:10:25 +02:00
Marc Chevrier 5fdfb2283a FindPython: fix SABIModule detection failure
Fixes: #27950
2026-07-16 17:28:43 +02:00
Brad King 1c142b916a Merge topic 'FindPython-windows-arm64' into release-4.4
363cba1ae6 FindPython: Restore support for Windows ARM64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12158
2026-06-10 09:53:01 -04:00
Julien Marrec 363cba1ae6 FindPython: Restore support for Windows ARM64
Fix a typo from commit 51e1459947 (FindPython: enhance ARCHITECTURE
detection, 2026-02-20, v4.3.0-rc2~21^2).

Fixes: #27864
2026-06-09 08:21:56 -04:00
Marc Chevrier 985dba8084 FindPython: Add support of Stable ABI for Free-Threaded python
Add the support of PEP803.

Fixes: #27736
2026-04-21 23:13:00 +02:00
Viraj Malia cf54a293ab FindPython: Fix finding NumPy with oneMKL 2026.0
Fix commit 516124ea23 (FindPython: fix regression of NumPy detection
with Intel MKL library, 2024-08-26, v3.30.3~4^2) to apply only on macOS.
It is not needed on other platforms, and oneMKL 2026.0 deprecates SSE4.2.
2026-03-06 14:14:21 -05:00
Marc Chevrier a207af22e5 FindPython: Ensure sysconfig paths are in CMake format
Fixes: #27648
2026-02-27 14:07:04 +01:00
Marc Chevrier 51e1459947 FindPython: enhance ARCHITECTURE detection
Fixes: #27619
2026-02-20 17:48:50 +01:00
Eisuke Kawashima b589a78497 FindPython: Use bracket arguments for python code blocks 2025-12-03 01:11:33 +09:00
Brad King 932ba12b41 Merge topic 'python_debug_postifx_no_interpreter'
6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter
43fec72adb Tests: Fix RunCMake.UseSWIG SetPOSTFIX case on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11345
2025-10-28 09:34:33 -04:00
Andrej730 6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter 2025-10-27 10:27:32 -04:00
Brad King badaeac947 Merge topic 'FindPython-3.15'
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Andrej <azhilenkov@gmail.com>
Merge-request: !11350
2025-10-25 09:16:06 -04:00
Karolina Surma 7f628ea04b FindPython: Add support for Python 3.15 2025-10-24 17:42:44 -04:00
Marc Chevrier 2656c5c017 FindPython: AIX: explicit link to python library is required
Fixes: #27200
2025-09-21 14:39:42 +02:00
Brad King c4fe74ba3d Merge topic 'python-android-link'
1507491c25 FindPython: link modules against libpython on Android

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11153
2025-09-16 09:16:35 -04:00
Malcolm Smith 1507491c25 FindPython: link modules against libpython on Android 2025-09-13 12:53:18 +01:00
Brad King 9af1de9409 Merge topic 'FindPython-ABI-handling'
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11145
2025-09-05 09:05:00 -04:00
Marc Chevrier c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable
Fixes: #27192
2025-09-04 15:06:57 +02:00
Marc Chevrier 0a4a4d2053 FindPython: NumPy target does not depend on Development.Module
Fixes: #27123
2025-08-25 15:28:41 +02:00
Brad King 2d7a0605f2 Merge topic 'Python3.14-support'
41a4a32135 FindPython: Avoid implicit link library on Windows
811f00f9ad FindPython: rely on ABIFLAGS on Windows for ABI profile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10800
2025-05-20 10:45:32 -04:00
Marc Chevrier 41a4a32135 FindPython: Avoid implicit link library on Windows
Starting with version 3.14, on Windows, by specifying macro Py_NO_LINK_LIB,
the python library is no longer implicitly specified at the link step.

Fixes: #26756
2025-05-20 09:16:14 -04:00
Marc Chevrier 811f00f9ad FindPython: rely on ABIFLAGS on Windows for ABI profile
Starting with Python 3.14, the config_var ABIFLAGS is now also available
on Windows.
2025-05-20 09:16:14 -04:00
Marc Chevrier bd7a27bcc7 FindPython: fix the definition of SABI artifacts
Fixes: #26881
2025-04-21 11:47:49 -04:00
Marc Chevrier f08b218a0d FindPython: ensure reproductibility between CMake calls
Ensures, when CMake is re-launched with some artifacts specified by the user,
that the multiple runs of CMake give always the same result.

Fixes: #26778
2025-03-22 15:32:42 +01:00
Marc Chevrier 5c1521c54d FindPython: enforce artifacts consistency when cross-compiling
Fixes: #26696
2025-03-05 17:11:56 +01:00
Kitware Robot 1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Marc Chevrier aed9dffdc9 FindPython: migrate tests to RunCMake framework 2025-02-28 17:55:24 +01:00
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