File tree Expand file tree Collapse file tree 3 files changed +45
-4
lines changed
Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Original file line number Diff line number Diff line change 3232 run : |
3333 apt update
3434 export DEBIAN_FRONTEND=noninteractive
35- apt install -y git python3-pip
35+ apt install -y git python3-pip curl
36+ if python3 -c 'import sys; exit(0 if sys.version_info >= (3, 9) else 1)'; then
37+ echo "Python version is >= 3.9"
38+ else
39+ echo "Python version is < 3.9. Updating to Python 3.9..."
40+ apt install -y software-properties-common
41+ add-apt-repository -y ppa:deadsnakes/ppa
42+ apt update
43+ apt install -y python3.9 python3.9-dev python3.9-distutils
44+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
45+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
46+ python3 get-pip.py
47+ rm get-pip.py
48+ fi
3649 . $IDF_PATH/export.sh
3750 pip3 install catkin_pkg lark-parser colcon-common-extensions
3851 # This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
@@ -112,4 +125,4 @@ jobs:
112125 make -f libmicroros.mk clean
113126 cd examples/int32_publisher_embeddedrtps
114127 idf.py set-target ${{ matrix.idf_target }}
115- idf.py build
128+ idf.py build
Original file line number Diff line number Diff line change 3737 run : |
3838 apt update
3939 export DEBIAN_FRONTEND=noninteractive
40- apt install -y git python3-pip
40+ apt install -y git python3-pip curl
41+ if python3 -c 'import sys; exit(0 if sys.version_info >= (3, 9) else 1)'; then
42+ echo "Python version is >= 3.9"
43+ else
44+ echo "Python version is < 3.9. Updating to Python 3.9..."
45+ apt install -y software-properties-common
46+ add-apt-repository -y ppa:deadsnakes/ppa
47+ apt update
48+ apt install -y python3.9 python3.9-dev python3.9-distutils
49+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
50+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
51+ python3 get-pip.py
52+ rm get-pip.py
53+ fi
4154 . $IDF_PATH/export.sh
4255 pip3 install catkin_pkg lark-parser empy==3.3.4 colcon-common-extensions
4356 # This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
Original file line number Diff line number Diff line change 33set -eu
44
55sudo apt update -q
6- sudo apt install -yq python3-pip
6+ sudo apt install -yq python3-pip curl
7+
8+ if python3 -c ' import sys; exit(0 if sys.version_info >= (3, 9) else 1)' ; then
9+ echo " Python version is >= 3.9"
10+ else
11+ echo " Python version is < 3.9. Updating to Python 3.9..."
12+ sudo apt install -y software-properties-common
13+ sudo add-apt-repository -y ppa:deadsnakes/ppa
14+ sudo apt update
15+ sudo apt install -y python3.9 python3.9-dev python3.9-distutils
16+ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
17+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
18+ python3 get-pip.py
19+ rm get-pip.py
20+ fi
21+
722source $IDF_PATH /export.sh
823pip3 install catkin_pkg lark-parser colcon-common-extensions importlib-resources
924
You can’t perform that action at this time.
0 commit comments