diff --git a/images/Dockerfile.ci b/images/Dockerfile.ci index 87bf92442..a9866d722 100644 --- a/images/Dockerfile.ci +++ b/images/Dockerfile.ci @@ -1,6 +1,9 @@ FROM ubuntu:24.04 ENV GNOCCHI_WORKSPACE /github/workspace ENV DEBIAN_FRONTEND noninteractive +# NOTE(callumdickinson): Needed for Debian-packaged setuptools to work with Python 3.9 and 3.11. +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003252 +ENV SETUPTOOLS_USE_DISTUTILS stdlib #NOTE(tobias-urdin): need gnupg for apt-key RUN apt-get update -y && apt-get install -qy gnupg software-properties-common @@ -15,12 +18,16 @@ RUN apt-get update -y && apt-get install -qy \ python3 \ python3-dev \ python3-pip \ + python3-setuptools \ + python3-wheel \ python3-virtualenv \ python3.9 \ python3.9-dev \ python3.9-distutils \ python3.11 \ python3.11-dev \ + python3.11-distutils \ + tox \ # Needed for uwsgi core routing support build-essential \ libffi-dev \ @@ -42,15 +49,6 @@ RUN apt-get update -y && apt-get install -qy \ RUN rm -rf /var/lib/apt/lists/* -# NOTE(tobias.urdin): hack since pyparsing in site-packages collides with our requirements -RUN rm -rf /usr/lib/python3/dist-packages/pyparsing* - -# NOTE(tobias.urdin): hack since jaraco packages in site-packages collides with our requirements -RUN rm -rf /usr/lib/python3/dist-packages/jaraco* - -# TODO(tobias.urdin): hack remove this when we drop python 3.9 -RUN sed -i '1s/^/from __future__ import annotations\n/' /usr/lib/python3/dist-packages/werkzeug/sansio/utils.py - #NOTE(sileht): really no utf-8 in 2017 !? ENV LANG en_US.UTF-8 RUN update-locale diff --git a/images/entrypoint.sh.ci b/images/entrypoint.sh.ci index f5e424e49..cc00ea2cb 100755 --- a/images/entrypoint.sh.ci +++ b/images/entrypoint.sh.ci @@ -1,7 +1,3 @@ #!/bin/sh -python3 -m virtualenv /tmp/gnocchi-tox-env -. /tmp/gnocchi-tox-env/bin/activate -pip install tox - $@ diff --git a/tox.ini b/tox.ini index 03f7e9afd..db8acdba0 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ passenv = GNOCCHI_TEST_* AWS_* setenv = - VIRTUALENV_SETUPTOOLS=bundle + SETUPTOOLS_USE_DISTUTILS={env:SETUPTOOLS_USE_DISTUTILS:local} GNOCCHI_TEST_STORAGE_DRIVER=file GNOCCHI_TEST_INDEXER_DRIVER=postgresql GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph s3 redis @@ -69,7 +69,6 @@ deps = # Gnocchi we can't reuse the virtualenv recreate = True setenv = - VIRTUALENV_SETUPTOOLS=bundle GNOCCHI_VERSION_FROM=stable/4.5 GNOCCHI_VARIANT=test,postgresql,file deps = @@ -84,7 +83,6 @@ allowlist_externals = {toxinidir}/run-upgrade-tests.sh # Gnocchi we can't reuse the virtualenv recreate = True setenv = - VIRTUALENV_SETUPTOOLS=bundle GNOCCHI_VERSION_FROM=stable/4.5 GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib deps = @@ -134,7 +132,6 @@ deps = .[test,file,postgresql,doc] doc8 setenv = - VIRTUALENV_SETUPTOOLS=bundle GNOCCHI_TEST_DEBUG=1 commands = doc8 --ignore-path doc/source/rest.rst,doc/source/comparison-table.rst doc/source @@ -145,7 +142,6 @@ allowlist_externals = /bin/bash /bin/rm setenv = - VIRTUALENV_SETUPTOOLS=bundle GNOCCHI_STORAGE_DEPS=file GNOCCHI_TEST_DEBUG=1 deps =