Page MenuHomePhabricator

[CMAKE] Consistently find and use the python interpreter

Authored by Fabien on Sep 24 2019, 09:16.



Some of the python scripts rely on the shebang, some of them search for
the python program, the behavior is inconsistent across the files.

This diff makes use of find_package to get the python interpreter
executable path. This allow for failing with a meaningful error message
if python is not found or does not match the minimum version.

Depends on D4143.

Test Plan
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja check
ninja check-functional
ninja bench-bitcoin

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Sep 24 2019, 09:16
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 24 2019, 09:16
Fabien planned changes to this revision.Sep 24 2019, 09:29
Fabien retitled this revision from [CMAKE] Consistently find the python interpreter to [CMAKE] Consistently find and use the python interpreter.Sep 24 2019, 09:34
Fabien edited the summary of this revision. (Show Details)
Fabien updated this revision to Diff 13106.Sep 24 2019, 09:37

Search python once.

deadalnix accepted this revision.Sep 24 2019, 14:07
This revision is now accepted and ready to land.Sep 24 2019, 14:07
This revision was automatically updated to reflect the committed changes.