Skip to content

Commit

Permalink
update ubuntu bionic to use python 3.7
Browse files Browse the repository at this point in the history
The pip package is for python 3.6, but installs pip for all versions of
python. Apparently. Including python 3.7.

So do all other packages, especially the ones where it doesn't work but
pip thinks it is installed anyway. Force a reinstall.
  • Loading branch information
eli-schwartz committed Jan 10, 2022
1 parent 6f8008c commit 0c30db2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ci/ciimage/bionic/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export DC=gdc

pkgs=(
python3-pip libxml2-dev libxslt1-dev libyaml-dev libjson-glib-dev
python3.7 python3.7-dev
wget unzip cmake doxygen
clang
pkg-config-arm-linux-gnueabihf
Expand Down Expand Up @@ -47,7 +48,13 @@ done
# packages
eatmydata apt-get -y install "${pkgs[@]}"

install_python_packages
# Actually select the right python version
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 \
--slave /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc python3.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.6.pc
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 \
--slave /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc python3.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.7.pc

python3 -m pip install -U "${base_python_pkgs[@]}" "${python_pkgs[@]}"

# Install the ninja 0.10
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
Expand Down

0 comments on commit 0c30db2

Please sign in to comment.