Commit Graph

62 Commits

Author SHA1 Message Date
Brad King
35d9ca268b Merge topic 'FindPython-fix-VIRTUALENV-eq-FIRST'
81beb28752 FindPython: fix handling when FIND_VIRTUALENV == FIRST

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4557
2020-04-02 11:12:54 -04:00
Marc Chevrier
81beb28752 FindPython: fix handling when FIND_VIRTUALENV == FIRST
Fixes: #20525
2020-04-01 10:36:46 -04:00
Marc Chevrier
dd0664415a FindPython: use 'sysconfig' as alternate to 'distutils.sysconfig'
To support any python installation, if package 'distutils.sysconfig'
is not available, try to use package 'sysconfig'.

Fixes: #20502
2020-03-28 10:51:47 +01:00
Brad King
83f5ba06df Merge topic 'FindPython-variable-spelling-error'
63580668a8 FindPython: fix variable spelling error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4529
2020-03-27 07:44:12 -04:00
Marc Chevrier
63580668a8 FindPython: fix variable spelling error 2020-03-26 18:08:25 +01:00
Brad King
f2b4576373 Merge topic 'FindPython-polish'
bf1ecfef7f FindPython: misc. fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4519
2020-03-25 08:13:07 -04:00
Marc Chevrier
bf1ecfef7f FindPython: misc. fixes
Help: Fix errors regardings HINTS.
Code: Optimize Python signature cache variable to avoid unecessary searchs.
2020-03-24 18:26:16 +01:00
Brad King
3c7774e207 Merge topic 'FindPython-version-validation-fix'
cc7f116cb4 FindPython: fix regression on version validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
2020-03-18 07:54:23 -04:00
Marc Chevrier
cc7f116cb4 FindPython: fix regression on version validation
In commit 3dab4682f6 (FindPython: reduces consumption of resources,
2020-02-10, v3.17.0-rc1~11^2) we accidentally broke the python
executable version validation when the "LOCATION" strategy is used
with the plain `FindPython` module.  Fix the logic and add test
cases covering those combinations.

Fixes: #20465
2020-03-17 10:08:34 -04:00
Brad King
3a49ea6f25 Merge topic 'FindPython-ENV-CMAKE_FRAMEWORK_PATH'
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !4462
2020-03-12 08:18:54 -04:00
Bo Anderson
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path 2020-03-11 13:35:33 -04:00
Marc Chevrier
e5b4c74238 FindPython: Add possibility to control scope of artifacts.
Fixes: #20362
2020-03-05 16:44:48 +01:00
Marc Chevrier
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.
Fixes: #20408
2020-03-03 13:13:48 +01:00
Marc Chevrier
1dc524f202 FindPython: Do not cache computed result variables in CMake 3.16
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally add the result
variables `Python*_LIBRARY_RELEASE` and `Python*_LIBRARY_DEBUG` to the
cache.  They are always computed from other results and so should not be
presented to users in cmake-gui and ccmake to edit.

Issue: #20362
2020-02-26 08:09:21 -05:00
Marc Chevrier
602d1d8201 FindPython: Mark non-public cache entries INTERNAL in CMake 3.16
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally expose cache
entries named `_Python...` to users in cmake-gui and ccmake.  Mark those
entries as `INTERNAL` to hide them.

Issue: #20362
2020-02-26 08:09:16 -05:00
Marc Chevrier
42c6a1bfee FindPython: Do not cache computed result variables
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally add the result
variables `Python*_LIBRARY_RELEASE` and `Python*_LIBRARY_DEBUG` to the
cache.  They are always computed from other results and so should not be
presented to users in cmake-gui and ccmake to edit.

Issue: #20362
2020-02-26 08:08:26 -05:00
Marc Chevrier
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally expose cache
entries named `_Python...` to users in cmake-gui and ccmake.  Mark those
entries as `INTERNAL` to hide them.

Issue: #20362
2020-02-26 08:08:03 -05:00
Marc Chevrier
3dab4682f6 FindPython: reduces consumption of resources
Stores more information in the cache to reduce the number
of sub-processes required on subsequent find_package calls.

Fixes: #20337
2020-02-10 12:41:04 +01:00
Brad King
513c7bf515 Merge topic 'python39'
f6474214b3 FindPython: Add support for version 3.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Marc Chevrier <marc.chevrier@gmail.com>
Acked-by: Björn Esser <besser82@fedoraproject.org>
Merge-request: !4225
2020-01-15 13:36:35 -05:00
Miro Hrončok
f6474214b3 FindPython: Add support for version 3.9
Development versions of Python 3.9.0 are already out there.

See PEP 596 -- Python 3.9 Release Schedule:
https://www.python.org/dev/peps/pep-0596/
2020-01-14 15:02:19 -05:00
Brad King
df1fad32ad Merge topic 'macOS-Xcode-11-frameworks'
fcde42751a FindPython: ensure new Xcode framework for Python3 is detected
dd7b741b81 macOS: Add support for new Xcode 11 frameworks directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4198
2020-01-13 10:20:59 -05:00
Marc Chevrier
fcde42751a FindPython: ensure new Xcode framework for Python3 is detected 2020-01-10 13:48:39 +01:00
Marc Chevrier
61502d3956 FindPython: Add variable Python_SOABI
This variable holds the standard extension suffix for modules.

Fixes: #20150
2020-01-09 14:43:22 +01:00
Marc Chevrier
417c533010 Merge topic 'findpython_conda_support'
776d27d4a4 FindPython: Extend virtual environment handling by considering conda

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4155
2019-12-23 06:33:54 -05:00
Sebastian Müller
776d27d4a4 FindPython: Extend virtual environment handling by considering conda
- Add functionality to recognize and use CONDA_PREFIX environment variable
- Add tests for conda virtual environments
- Fixes: #20111
2019-12-21 15:38:00 +01:00
Kyle Edwards
3e07995bdd Merge topic 'FindPython-Fix-target-properties'
fe280e0cda FindPython*: Fix erroneous target properties setting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4154
2019-12-20 12:57:07 -05:00
Marc Chevrier
fe280e0cda FindPython*: Fix erroneous target properties setting
Property IMPORTED_CONFIGURATIONS for targets Python*::Python
and Python*::Module is not correctly set.
2019-12-19 19:42:24 +01:00
Marc Chevrier
687a354518 FindPython: customize failure message 2019-11-01 12:10:30 +01:00
Marc Chevrier
06d9e67fbd FindPython: Add capability to specify directly artifacts
Fixes: #19492
2019-09-02 17:20:53 +02:00
Marc Chevrier
cea2010b5c FindPython: Enhance python cache variables management.
Ensure multiple cmake runs without cache clean-up will preserve artifacts selected on first run.

This change address the issue #19492.
2019-09-02 13:19:01 +02:00
Marc Chevrier
7ed84b1e8f FindPython: ensure virtual environments are correctly handled
Fixes: #19525
2019-08-05 18:20:29 +02:00
Brad King
ae84427e32 Merge topic 'FindPython-interpreter-crosscompiling'
696d0f9caf FindPython: ensure interpreter is founded when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3564
2019-07-18 07:15:48 -04:00
Marc Chevrier
696d0f9caf FindPython: ensure interpreter is founded when cross-compiling
Fixes: #19473
2019-07-18 07:13:20 -04:00
Marc Chevrier
9201908ca5 FindPython: add Python_FIND_ABI hint.
This variable will enable to specify will ABIs will be searched.
2019-06-24 12:00:21 +02:00
Marc Chevrier
52b298bd03 FindPython: ensure Python_ROOT_DIR is always searched first 2019-05-31 19:05:04 +02:00
Marc Chevrier
4a871d51a3 FindPython*: remove erroneous code 2019-05-30 13:40:46 +02:00
Marc Chevrier
62d6ed79fb FindPython: Add variable 'Python_FIND_FRAMEWORK' to control frameworks lookup. 2019-05-24 18:44:43 +02:00
Marc Chevrier
8517b549f4 FindPython: Add policy to manage lookup stratgey default. 2019-05-21 16:13:27 +02:00
Marc Chevrier
9f205acefe FindPython: Implement lookup strategies.
Configration variable Python_FIND_STRATEGY controls the lookup startegy.
Possible values are LOCATION and VERSION.

Fixes: #19159
2019-05-21 16:13:27 +02:00
Marc Chevrier
30b873c05d FindPython*: Manage weak link for Python modules
Add new target Python::Module which take care of platform requirements
for Python module development.

Fixes: #18100
2019-05-07 16:37:24 +02:00
Brad King
aae79c2d70 Merge topic 'FindPython-fix-Python_RUNTIME_LIBRARY_DIRS-variable'
34c0293532 FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3287
2019-05-06 09:33:45 -04:00
Marc Chevrier
34c0293532 FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly 2019-05-05 12:55:39 +02:00
Brad King
6dbc12df68 Merge topic 'FindPython-NumPy-fix-dependencies-management'
68c8201711 FindPython: NumPy: fix erroneous dependencies management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3274
2019-05-01 12:02:07 -04:00
Marc Chevrier
68c8201711 FindPython: NumPy: fix erroneous dependencies management 2019-04-30 16:02:18 +02:00
Marc Chevrier
8a2f62cc18 FindPython*: Add capability to control virtual env handling.
Fixes: #19097
2019-04-03 09:16:17 +02:00
Marc Chevrier
9a84cb1663 FindPython*: ensure correct architecture is selected.
Ensure interpreter and libraries architecture matches CMake build
configuration.
Update documentation about interpreter constraints.

Fixes: #19024
2019-03-14 18:53:57 +01:00
Marc Chevrier
8e3358336d FindPython: Fix NumPy component include directory
Update the component added by commit 513e77550d (FindPython: Introduce
NumPy component, 2018-12-12, v3.14.0-rc1~95^2).  The `numpy/`
sub-directory should not be part of the include directory.  It should be
part of the `#include` line.
2019-03-04 08:28:21 -05:00
Hiroshi Miura
513e77550d FindPython: Introduce NumPy component
Fixes: #18678
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-01-25 01:26:48 +09:00
Kyle Edwards
e4541b0e3d FindPython: Support script mode
Fixes: #18827
2019-01-23 13:51:09 -05:00
Marc Chevrier
c24f29c664 FindPython: Ensure config tool matches library architecture 2018-11-19 15:36:26 -05:00