Don't use FindPythonInterp #389

Closed
opened 2020-03-18 10:27:07 -05:00 by okhowang · 3 comments
okhowang commented 2020-03-18 10:27:07 -05:00 (Migrated from github.com)

Description

Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

see https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
FindPythonInterp may failed when python 2 found first

<!-- ************************************** WARNING ************************************** The ciarcom bot parses this header automatically. Any deviation from the template may cause the bot to automatically correct this header or may result in a warning message, requesting updates. Please ensure that nothing follows the Issue request type section, all issue details are within the Description section and no changes are made to the template format (as detailed below). ************************************************************************************* --> ### Description <!-- Required Add detailed description of what you are reporting. Good example: https://os.mbed.com/docs/latest/reference/workflow.html Things to consider sharing: - What target does this relate to? - What toolchain (name + version) are you using? - What tools (name + version - is it mbed-cli, online compiler or IDE) are you using? - What is the SHA of Mbed OS (git log -n1 --oneline)? - Steps to reproduce. (Did you publish code or a test case that exhibits the problem?) --> ### Issue request type <!-- Required Please add only one X to one of the following types. Do not fill multiple types (split the issue otherwise.) Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front of them would change the meaning incorrectly. The only changes to be made are to add a description text under the description heading and to add a 'x' to the correct box. --> [ ] Question [x] Enhancement [ ] Bug see [https://cmake.org/cmake/help/latest/module/FindPythonInterp.html](https://cmake.org/cmake/help/latest/module/FindPythonInterp.html) FindPythonInterp may failed when python 2 found first
gilles-peskine-arm commented 2020-03-23 12:46:38 -05:00 (Migrated from github.com)

Note that we do want to maintain backward compatibility with somewhat older versions of cmake, at least cmake 3.5.1 which is the version of Ubuntu 16.04. So we can't just switch to FindPython3 or FindPython.

Note that we do want to maintain backward compatibility with somewhat older versions of cmake, at least cmake 3.5.1 which is the version of Ubuntu 16.04. So we can't just switch to `FindPython3` or `FindPython`.
okhowang commented 2020-03-23 19:33:15 -05:00 (Migrated from github.com)

can we add a progressive upgraded behaviour?
for example if cmake version > 3.x do FindPython3 instead of FindPythonInterp

can we add a progressive upgraded behaviour? for example if cmake version > 3.x do `FindPython3` instead of `FindPythonInterp`
gilles-peskine-arm commented 2020-03-24 03:48:03 -05:00 (Migrated from github.com)

Sure. As long as the file can be parsed with older versions, that's ok. We have tests on GCC_VERSION, we can have tests on CMAKE_VERSION as well (or on cmake_is_module_available("FindPython3") if there's such a thing?).

Sure. As long as the file can be parsed with older versions, that's ok. We have tests on `GCC_VERSION`, we can have tests on `CMAKE_VERSION` as well (or on `cmake_is_module_available("FindPython3")` if there's such a thing?).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto#389
No description provided.