@@ -49,15 +49,26 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
4949 apt-get update && \
5050 apt-get install -y curl git-core python3-pip \
5151 python3.8 python3.8-venv python3.8-dev \
52+ python3.10 python3.10-venv python3.10-dev \
5253 python3.11 python3.11-venv python3.11-dev \
54+ python3.12 python3.12-venv python3.12-dev \
55+ python3.13 python3.13-venv python3.13-dev \
5356 virtualenv net-tools libev4 libev-dev wget gcc libxml2 libxslt1-dev \
5457 vim lsof sudo libjemalloc2 dumb-init locales rsync \
5558 openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk ant ant-optional
5659
5760RUN update-alternatives --remove java /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/bin/java
5861RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin/java 1081
59- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
60- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 3
62+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
63+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
64+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
65+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
66+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 1
67+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
68+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
69+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
70+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
71+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1
6172RUN python3.8 -m pip install --upgrade pip
6273
6374# generate locales for the standard en_US.UTF8 value we use for testing
@@ -100,7 +111,7 @@ RUN bash /tmp/_prepopulate_maven_deps.sh /home/image-cache/.m2/repository
100111RUN cp -a /home/cassandra-tmp/.gradle /home/image-cache/.gradle
101112
102113# run pip commands and setup virtualenv (note we do this after we switch to cassandra user so we
103- # setup the virtualenv for the cassandra user and not the root user by accident ) for Python 3.8/3.11
114+ # setup the virtualenv for the cassandra user, not root) for Python 3.8-3.13
104115# Don't build cython extensions when installing cassandra-driver. During test execution the driver
105116# dependency is refreshed via pip install --upgrade, so that driver changes can be pulled in without
106117# requiring the image to be rebuilt. Rebuilding compiled extensions is costly and is disabled by
@@ -117,6 +128,16 @@ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
117128 && pip3 install -r /opt/requirements.txt \
118129 && pip3 freeze --user"
119130
131+ RUN virtualenv --python=python3.10 ${BUILD_HOME}/env3.10
132+ RUN chmod +x ${BUILD_HOME}/env3.10/bin/activate
133+
134+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
135+ && source ${BUILD_HOME}/env3.10/bin/activate \
136+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
137+ && pip3 install --upgrade \"pip<25.0\" \"setuptools==60.8.2\" wheel \
138+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
139+ && pip3 freeze --user"
140+
120141RUN python3.11 -m venv ${BUILD_HOME}/env3.11
121142RUN chmod +x ${BUILD_HOME}/env3.11/bin/activate
122143
@@ -127,6 +148,28 @@ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
127148 && pip3 install --no-build-isolation -r /opt/requirements.txt \
128149 && pip3 freeze --user"
129150
151+ RUN virtualenv --python=python3.12 ${BUILD_HOME}/env3.12
152+ RUN chmod +x ${BUILD_HOME}/env3.12/bin/activate
153+
154+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
155+ && source ${BUILD_HOME}/env3.12/bin/activate \
156+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \
157+ && pip3 install --upgrade \"pip<25.0\" \"setuptools>=65.5.0,<70.0.0\" wheel \
158+ && sed -i 's/pkgutil.ImpImporter/type(\"ImpImporter\", (object,), {})/g' ${BUILD_HOME}/env3.12/lib/python3.12/site-packages/pkg_resources/__init__.py \
159+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
160+ && pip3 freeze --user"
161+
162+ RUN virtualenv --python=python3.13 ${BUILD_HOME}/env3.13
163+ RUN chmod +x ${BUILD_HOME}/env3.13/bin/activate
164+
165+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
166+ && source ${BUILD_HOME}/env3.13/bin/activate \
167+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13 \
168+ && pip3 install --upgrade \"pip<25.0\" \"setuptools>=65.5.0,<70.0.0\" wheel \
169+ && sed -i 's/pkgutil.ImpImporter/type(\"ImpImporter\", (object,), {})/g' ${BUILD_HOME}/env3.13/lib/python3.13/site-packages/pkg_resources/__init__.py \
170+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
171+ && pip3 freeze --user"
172+
130173# 4* requires java8, sudo doesn't work on cross-platform builds
131174USER root
132175RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin/java
0 commit comments