From d18a2b22f922bf9358f39a201010167853bb756e Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Sat, 7 Sep 2024 13:56:26 -0600 Subject: [PATCH] Tools: Give ardupilot venv access to system packages * When possible, we can use the apt-installed python packages which are ABI stable * Same for the other OS's that have VENV setup scripts Signed-off-by: Ryan Friedman --- Tools/environment_install/install-prereqs-arch.sh | 2 +- .../environment_install/install-prereqs-openSUSE-Tumbleweed.sh | 2 +- Tools/environment_install/install-prereqs-ubuntu.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/environment_install/install-prereqs-arch.sh b/Tools/environment_install/install-prereqs-arch.sh index 8bba1d360876b..eff9fb0f6d65c 100755 --- a/Tools/environment_install/install-prereqs-arch.sh +++ b/Tools/environment_install/install-prereqs-arch.sh @@ -54,7 +54,7 @@ sudo usermod -a -G uucp "$USER" sudo pacman -Syu --noconfirm --needed $BASE_PKGS $SITL_PKGS $PX4_PKGS -python3 -m venv "$HOME"/venv-ardupilot +python3 -m venv --system-site-packages "$HOME"/venv-ardupilot # activate it: SOURCE_LINE="source $HOME/venv-ardupilot/bin/activate" diff --git a/Tools/environment_install/install-prereqs-openSUSE-Tumbleweed.sh b/Tools/environment_install/install-prereqs-openSUSE-Tumbleweed.sh index acc86a9f4090c..46f4b25fa61cf 100755 --- a/Tools/environment_install/install-prereqs-openSUSE-Tumbleweed.sh +++ b/Tools/environment_install/install-prereqs-openSUSE-Tumbleweed.sh @@ -88,7 +88,7 @@ sudo usermod -a -G dialout "$USER" $ZYPPER $BASE_PKGS $SITL_PKGS || echo "Check zypper output for errors" -python3 -m venv "$HOME"/venv-ardupilot +python3 -m venv --system-site-packages "$HOME"/venv-ardupilot SHELL_LOGIN=".profile" # activate it: diff --git a/Tools/environment_install/install-prereqs-ubuntu.sh b/Tools/environment_install/install-prereqs-ubuntu.sh index 0f27d11bdf712..ea22a423c4b49 100755 --- a/Tools/environment_install/install-prereqs-ubuntu.sh +++ b/Tools/environment_install/install-prereqs-ubuntu.sh @@ -386,7 +386,7 @@ fi if [ -n "$PYTHON_VENV_PACKAGE" ]; then $APT_GET install $PYTHON_VENV_PACKAGE - python3 -m venv $HOME/venv-ardupilot + python3 -m venv --system-site-packages $HOME/venv-ardupilot # activate it: SOURCE_LINE="source $HOME/venv-ardupilot/bin/activate"