From b2be79f5cf7c99a528af2de3a3e5e9fb89a29e79 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Wed, 20 Dec 2023 21:18:31 +0100 Subject: [PATCH] Upgrade Python to 3.10 for newer Django versions. --- projects/django/Dockerfile | 8 +++++++- projects/django/build.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/django/Dockerfile b/projects/django/Dockerfile index 0f3a65a7be11..77606153b24f 100644 --- a/projects/django/Dockerfile +++ b/projects/django/Dockerfile @@ -16,7 +16,13 @@ FROM gcr.io/oss-fuzz-base/base-builder-python -RUN apt-get update && apt-get install -y libgdal26 +RUN apt-get update -y \ + && apt-get install -y libgdal26 software-properties-common \ + && add-apt-repository -y ppa:deadsnakes/ppa \ + && apt-get install -y python3.10 python3.10-dev \ + && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \ + && python3.10 -m pip install -v --no-cache-dir "atheris>=2.1.1" "pyinstaller==5.0.1" "coverage==6.3.2" \ + && rm -rf /var/lib/apt/lists/* RUN git clone --depth 1 https://github.com/django/django.git RUN git clone --depth 1 https://github.com/django/django-fuzzers.git diff --git a/projects/django/build.sh b/projects/django/build.sh index b7ab22648b4b..8c66b2f36844 100755 --- a/projects/django/build.sh +++ b/projects/django/build.sh @@ -17,7 +17,7 @@ # Build and install project (using current CFLAGS, CXXFLAGS). This is required # for projects with C extensions so that they're built with the proper flags. -pip3 install . +python3.10 -m pip install . export DJANGO_SETTINGS_MODULE=fuzzer_project.settings