mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-10 06:39:25 +08:00
fe22c53f17
cmake/kconfig.cmake verified that kconfiglib is installed by running
`python -c "import menuconfig"`. The `menuconfig` entry point pulls in
the standard library `curses` module, which is missing on a number of
hosts we care about:
- the macOS arm64 hostedtoolcache Python (3.10.11) used by the
`MacOS build` job, which now fails the kconfiglib check during
cmake configure of px4_sitl_default
- any Windows Python that does not have windows-curses installed
(kconfiglib stopped pulling it in automatically at 13.0)
We never invoke menuconfig from the build itself - only the standalone
`make menuconfig` developer target does, and there the curses
dependency is unavoidable. Probe with `import kconfiglib` instead, so
configure succeeds anywhere kconfiglib (the actual dependency) is
importable. Also tighten the failure check to `NOT ret EQUAL "0"` so
non-zero return codes other than 1 are caught.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>