Skip to content

Commit

Permalink
Remove python3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Jul 30, 2024
1 parent ee460ba commit 8744d9a
Showing 1 changed file with 35 additions and 37 deletions.
72 changes: 35 additions & 37 deletions all/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ RUN apt-install git-core build-essential pkg-config

ADD https://bootstrap.pypa.io/get-pip.py /usr/share/python/get-pip.py
RUN apt-install \
python3-dev \
python3-setuptools \
python3-wheel \
python3-venv \
python3-virtualenv \
python-is-python3
python3-dev \
python3-setuptools \
python3-wheel \
python3-venv \
python3-virtualenv \
python-is-python3

RUN apt-install -y python3.7 python3.7-dev python3.7-venv
RUN apt-install -y python3.8 python3.8-dev python3.8-venv
RUN apt-install -y python3.9 python3.9-dev python3.9-venv
RUN apt-install -y python3.10 python3.10-dev python3.10-venv python3.10-distutils
Expand All @@ -25,54 +24,53 @@ RUN apt-install -y python3.12 python3.12-dev python3.12-venv python3.12-distutil
RUN apt-install -y python3.13 python3.13-dev python3.13-venv python3.13-nogil

RUN apt-install \
cargo \
libffi-dev \
libmysqlclient-dev \
libpq-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
rustc
cargo \
libffi-dev \
libmysqlclient-dev \
libpq-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
rustc

# No create cargo cache and fixing the armv7 builds
RUN ln -snf /dev/shm /root/.cargo

RUN \
python3.7 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.8 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.9 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.10 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.11 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.12 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.8 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.9 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.10 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.11 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.12 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.13 /usr/share/python/get-pip.py "pip == 24.0" "setuptools < 60" "wheel == 0.37.0" "cython"

# Upgrade preinstalled wheels
RUN rm -fr \
/usr/share/python-wheels/pip*.whl \
/usr/share/python-wheels/wheel*.whl \
/usr/share/python-wheels/setuptools*.whl \
&& python3 -m pip wheel --cache-dir /tmp/wheels -w /usr/share/python-wheels --no-binary=:all: \
"pip==24.0" "wheel==0.37.0" "setuptools<60" \
&& rm -fr /tmp/wheels
/usr/share/python-wheels/pip*.whl \
/usr/share/python-wheels/wheel*.whl \
/usr/share/python-wheels/setuptools*.whl \
&& python3 -m pip wheel --cache-dir /tmp/wheels -w /usr/share/python-wheels --no-binary=:all: \
"pip==24.0" "wheel==0.37.0" "setuptools<60" \
&& rm -fr /tmp/wheels

RUN --mount=type=cache,target=/tmp/cache \
python3 -m venv /usr/share/python3/tox && \
/usr/share/python3/tox/bin/pip install tox && \
ln -snf /usr/share/python3/tox/bin/tox /usr/bin/tox && \
ln -snf /usr/share/python3/tox/bin/tox /usr/local/bin/tox
/usr/share/python3/tox/bin/pip install tox && \
ln -snf /usr/share/python3/tox/bin/tox /usr/bin/tox && \
ln -snf /usr/share/python3/tox/bin/tox /usr/local/bin/tox

RUN --mount=type=cache,target=/tmp/cache \
python3 -m venv /usr/share/python3/coveralls && \
/usr/share/python3/coveralls/bin/pip install coveralls && \
ln -snf /usr/share/python3/coveralls/bin/coveralls /usr/bin/coveralls && \
ln -snf /usr/share/python3/coveralls/bin/coveralls /usr/local/bin/coveralls
/usr/share/python3/coveralls/bin/pip install coveralls && \
ln -snf /usr/share/python3/coveralls/bin/coveralls /usr/bin/coveralls && \
ln -snf /usr/share/python3/coveralls/bin/coveralls /usr/local/bin/coveralls

RUN --mount=type=cache,target=/tmp/cache \
python3 -m venv /usr/share/python3/poetry && \
/usr/share/python3/poetry/bin/pip install poetry && \
ln -snf /usr/share/python3/poetry/bin/poetry /usr/bin/poetry && \
ln -snf /usr/share/python3/poetry/bin/poetry /usr/local/bin/poetry
/usr/share/python3/poetry/bin/pip install poetry && \
ln -snf /usr/share/python3/poetry/bin/poetry /usr/bin/poetry && \
ln -snf /usr/share/python3/poetry/bin/poetry /usr/local/bin/poetry

ENV PIP_CONFIG_FILE /etc/pip.conf

Expand Down

0 comments on commit 8744d9a

Please sign in to comment.