Page MenuHomePhabricator

[CMAKE] Consistently find and use the python interpreter
ClosedPublic

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

Details

Summary

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

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

Event Timeline

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

Search python once.

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