Skip to content
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

Python virtual environment #3305

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
guard venv boostrap
  • Loading branch information
Fabien-B authored and Fabien-B committed Oct 14, 2024
commit 697ec20a2adce2358b569bfdc6761b2e9fca0940
10 changes: 9 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ do
if [ "$arg" = "-s" ] || [ "$arg" = "--source" ]
then
BASHRC_SOURCE_VENV=true
"venv source will be added to ~/.bashrc"
fi

done


if [ $VIRTUAL_ENV ]
then
echo "Cannot create venv from itself! Run 'deactivate' first if you want to recreate the venv."
USE_VENV = false
BASHRC_SOURCE_VENV=false
fi


if [ "$USE_VENV" = true ]
then
sudo apt install -y python3 python3-venv
Expand All @@ -40,6 +47,7 @@ then

if [ "$BASHRC_SOURCE_VENV" = true ]
then
echo "venv source will be added to ~/.bashrc"
echo "source $(pwd)/pprzEnv/bin/activate" >> ~/.bashrc
fi

Expand Down