ci: don't rely on dist-bundled Python, use pyenv to use fixed version

This commit is contained in:
Kittywhiskers Van Gogh 2023-06-20 19:10:54 +00:00 committed by PastaPastaPasta
parent df18cc24f0
commit b7ead8c6bd

View File

@ -33,13 +33,32 @@ RUN apt-get update && apt-get install $APT_ARGS \
libtool \
m4 \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
zlib1g-dev
# Python stuff
# Python setup
# PYTHON_VERSION should match the value in .python-version
ARG PYTHON_VERSION=3.8.16
RUN apt-get update && apt-get install $APT_ARGS \
ca-certificates \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
llvm \
make \
tk-dev \
xz-utils
ENV PYENV_ROOT "/usr/local/pyenv"
ENV PATH "${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
RUN curl https://pyenv.run | bash \
&& pyenv update \
&& pyenv install $PYTHON_VERSION \
&& pyenv global $PYTHON_VERSION \
&& pyenv rehash
RUN pip3 install \
codespell==1.17.1 \
flake8==3.8.3 \