Skip to content

Fix python3 executable path - #13

Merged
bkueng merged 1 commit into
mavlink:mainfrom
Ryanf55:python3-executable
Nov 6, 2025
Merged

Fix python3 executable path#13
bkueng merged 1 commit into
mavlink:mainfrom
Ryanf55:python3-executable

Conversation

@Ryanf55

@Ryanf55 Ryanf55 commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Fixes build errors encountered in Dockerized environment.

We now use the FindPython3 module.
Python2, and the path to /usr/bin/python is not installed on Ubuntu 22 or later.

I encountered build problems here: mavlink/MAVSDK#2691 (comment)

Tested with this dockerfile:

FROM ubuntu:22.04

WORKDIR /ws

# https://mavsdk.mavlink.io/main/en/cpp/guide/build_linux.html

RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
    --mount=target=/var/cache/apt,type=cache,sharing=locked \
    apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get -y install \
        build-essential \
        cmake \
        git \
        python3 \
        python3-pip

COPY . .
RUN python3 -m pip install -r requirements.txt
RUN cmake -B build -S libs/cpp
RUN cmake --build build
RUN cmake --install build --prefix install

I am not sure how/why CI is currently working. Maybe it isn't on Ubuntu:22.

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@hamishwillee
hamishwillee requested review from bkueng and julianoes and removed request for julianoes November 5, 2025 20:35
@hamishwillee

Copy link
Copy Markdown
Collaborator

@bkueng When you get a moment!

@julianoes julianoes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's ok but I'll leave it up to @bkueng.

@bkueng bkueng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. You might want to disable testing if you just want to install it.

CI runs on ubuntu-latest: https://github.com/mavlink/libevents/blob/main/.github/workflows/tests.yml#L17

@bkueng
bkueng merged commit e78a771 into mavlink:main Nov 6, 2025
1 check passed
@Ryanf55
Ryanf55 deleted the python3-executable branch November 6, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants