-
Notifications
You must be signed in to change notification settings - Fork 37.8k
cmake: make missing Python interpreter behaviour more explicit #33278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Rather than failing, skip the deploy target (which was not explicitly requested) and explicitly warn the user.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33278. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Adds new option (default on) to control the building of functional tests. In a future commit, allows us to FATAL_ERROR if no required Python interpreter can be found.
The functional tests have a hard Python requirement. Building them without being able to run them is unintuitive and error-prone for automated systems like CI, so instead raise a FATAL_ERROR if Python requirement is not satisfied. Note: on platforms without the minimum (currently 3.10) Python version installed, this will lead to the default configuration (`cmake -B build`) failing, instead requiring tests to be explicitly disabled (`cmake -B build -DBUILD_FUNCTIONAL_TESTS=0`).
Affected targets or usage already has explicit warnings or errors.
a0b6492
to
bad9092
Compare
Force-pushed to default |
ACK bad9092 We should not be building functional tests without the minimum python version satisfied, it seems fine to leave it as a warning for maintenance and deploy targets, since these will error later when attempting to build the target. |
We require Python 3.10 for multiple targets, and currently raise a general warning if it is missing, leading to:
This PR:
BUILD_FUNCTIONAL_TESTS
option (defaultON
) and raisesFATAL_ERROR
if Python is missing and we're building the functional testsconfigure_warnings
system (but requires further work to be completely removed)Behaviour changes:
cmake -B build
now throws aFATAL_ERROR
if minimum Python could not be found (overridden withcmake -B build -DBUILD_FUNCTIONAL_TESTS=0
)deploy
target no longer created if minimum Python could not be foundAlternative to #31669 and partially to #33144 and #32865, partially addresses #31476.