mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 13:02:25 +08:00
ci(windows): fix kconfiglib probe and MinGW pyros-genmsg deps
Two independent failures in compile_windows.yml: MSVC: The `Install Python deps (MSVC)` step verified kconfiglib via `python -c "import menuconfig"`, but kconfiglib's menuconfig entry point imports the standard library `curses` module which is not shipped with the setup-python Windows interpreter. The job aborted with `ModuleNotFoundError: No module named '_curses'` before cmake ever ran. Probe with `import kconfiglib` instead, matching the matching change in cmake/kconfig.cmake. MinGW: `apt-get install python3-pyros-genmsg` returned exit 100 because pyros-genmsg is not packaged for Ubuntu noble. Drop it from the apt list and add it to the existing `pip install --user` line alongside empy 3.x. Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
This commit is contained in:
@@ -66,13 +66,15 @@ jobs:
|
||||
python3 python3-pip python3-jinja2 python3-yaml \
|
||||
python3-toml python3-numpy python3-packaging \
|
||||
python3-jsonschema python3-future \
|
||||
python3-kconfiglib python3-pyros-genmsg
|
||||
# PX4's msg/uxrce_dds/flight_tasks/zenoh generators rely on the
|
||||
# empy 3.x Interpreter API; install via pip (with --break-system-
|
||||
# packages on Ubuntu 24.04 where pip refuses to touch system
|
||||
# site-packages by default).
|
||||
python3 -m pip install --user --break-system-packages "empy>=3.3,<4" || \
|
||||
python3 -m pip install --user "empy>=3.3,<4"
|
||||
python3-kconfiglib
|
||||
# python3-pyros-genmsg is not packaged in Ubuntu noble; install
|
||||
# it via pip alongside empy. PX4's msg/uxrce_dds/flight_tasks/
|
||||
# zenoh generators rely on the empy 3.x Interpreter API, hence
|
||||
# the <4 pin (matches Tools/setup/requirements.txt). Use
|
||||
# --break-system-packages on Ubuntu 24.04 where pip refuses to
|
||||
# touch the system site-packages by default.
|
||||
python3 -m pip install --user --break-system-packages "empy>=3.3,<4" pyros-genmsg || \
|
||||
python3 -m pip install --user "empy>=3.3,<4" pyros-genmsg
|
||||
|
||||
- name: Setup ccache (MinGW)
|
||||
if: matrix.toolchain == 'MinGW'
|
||||
@@ -106,8 +108,11 @@ jobs:
|
||||
# in Tools/setup/requirements.txt and Tools/setup/windows.ps1.
|
||||
python -m pip install jinja2 pyyaml toml numpy packaging jsonschema future "empy>=3.3,<4" pyros-genmsg kconfiglib
|
||||
# Verify kconfiglib import on the same Python that CMake will pick
|
||||
# so we fail loud here rather than deep in cmake configure.
|
||||
python -c "import menuconfig; print(menuconfig.__file__)"
|
||||
# so we fail loud here rather than deep in cmake configure. Use
|
||||
# `import kconfiglib` (not `menuconfig`) because the menuconfig
|
||||
# entry point pulls in the standard `curses` module which is not
|
||||
# shipped on Windows Pythons by default.
|
||||
python -c "import kconfiglib; print(kconfiglib.__file__)"
|
||||
|
||||
- name: Install Ninja (MSVC)
|
||||
if: matrix.toolchain == 'MSVC'
|
||||
|
||||
Reference in New Issue
Block a user