@@ -49,15 +49,21 @@ 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
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 2
6064RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 3
65+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 4
66+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 5
6167RUN python3.8 -m pip install --upgrade pip
6268
6369# generate locales for the standard en_US.UTF8 value we use for testing
@@ -100,7 +106,7 @@ RUN bash /tmp/_prepopulate_maven_deps.sh /home/image-cache/.m2/repository
100106RUN cp -a /home/cassandra-tmp/.gradle /home/image-cache/.gradle
101107
102108# 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
109+ # setup the virtualenv for the cassandra user, not root) for Python 3.8-3.13
104110# Don't build cython extensions when installing cassandra-driver. During test execution the driver
105111# dependency is refreshed via pip install --upgrade, so that driver changes can be pulled in without
106112# requiring the image to be rebuilt. Rebuilding compiled extensions is costly and is disabled by
@@ -117,6 +123,16 @@ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
117123 && pip3 install -r /opt/requirements.txt \
118124 && pip3 freeze --user"
119125
126+ RUN virtualenv --python=python3.10 ${BUILD_HOME}/env3.10
127+ RUN chmod +x ${BUILD_HOME}/env3.10/bin/activate
128+
129+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
130+ && source ${BUILD_HOME}/env3.10/bin/activate \
131+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
132+ && pip3 install --upgrade \"pip<25.0\" \"setuptools==60.8.2\" wheel \
133+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
134+ && pip3 freeze --user"
135+
120136RUN python3.11 -m venv ${BUILD_HOME}/env3.11
121137RUN chmod +x ${BUILD_HOME}/env3.11/bin/activate
122138
@@ -127,6 +143,28 @@ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
127143 && pip3 install --no-build-isolation -r /opt/requirements.txt \
128144 && pip3 freeze --user"
129145
146+ RUN virtualenv --python=python3.12 ${BUILD_HOME}/env3.12
147+ RUN chmod +x ${BUILD_HOME}/env3.12/bin/activate
148+
149+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
150+ && source ${BUILD_HOME}/env3.12/bin/activate \
151+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \
152+ && pip3 install --upgrade \"pip<25.0\" \"setuptools>=65.5.0,<70.0.0\" wheel \
153+ && sed -i 's/pkgutil.ImpImporter/type(\"ImpImporter\", (object,), {})/g' ${BUILD_HOME}/env3.12/lib/python3.12/site-packages/pkg_resources/__init__.py \
154+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
155+ && pip3 freeze --user"
156+
157+ RUN virtualenv --python=python3.13 ${BUILD_HOME}/env3.13
158+ RUN chmod +x ${BUILD_HOME}/env3.13/bin/activate
159+
160+ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
161+ && source ${BUILD_HOME}/env3.13/bin/activate \
162+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13 \
163+ && pip3 install --upgrade \"pip<25.0\" \"setuptools>=65.5.0,<70.0.0\" wheel \
164+ && sed -i 's/pkgutil.ImpImporter/type(\"ImpImporter\", (object,), {})/g' ${BUILD_HOME}/env3.13/lib/python3.13/site-packages/pkg_resources/__init__.py \
165+ && pip3 install --no-build-isolation -r /opt/requirements.txt \
166+ && pip3 freeze --user"
167+
130168# 4* requires java8, sudo doesn't work on cross-platform builds
131169USER root
132170RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin/java
0 commit comments