From bbaa0925c1df14c60e70e38c72809047b297a806 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 20 Aug 2024 02:35:21 -0400 Subject: [PATCH 1/2] Use setuptools's private copy of distutils --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8cca3612c..3ed728449 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,11 @@ import os import sys import traceback -from distutils.ccompiler import CCompiler -from distutils.errors import DistutilsPlatformError from multiprocessing.pool import ThreadPool from setuptools import Extension, find_packages, setup +from setuptools._distutils.ccompiler import CCompiler +from setuptools._distutils.errors import DistutilsPlatformError from setuptools.command.build_ext import build_ext if os.name == 'nt': From 367abcc24826f2c109150a1497d2e0c2f53791ea Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 20 Aug 2024 02:39:15 -0400 Subject: [PATCH 2/2] Install setuptools when building docker Fixes #1182 Closes #1184 --- .docker/tier1/Dockerfile | 2 +- .docker/tier2/Dockerfile | 2 +- .docker/tier3/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/tier1/Dockerfile b/.docker/tier1/Dockerfile index 773ea874f..645dbdd28 100644 --- a/.docker/tier1/Dockerfile +++ b/.docker/tier1/Dockerfile @@ -4,7 +4,7 @@ ARG TAG=master RUN mkdir /judge /problems && cd /judge && \ curl -L https://github.com/DMOJ/judge-server/archive/"${TAG}".tar.gz | tar -xz --strip-components=1 && \ python3 -m venv --prompt=DMOJ /env && \ - /env/bin/pip3 install cython && \ + /env/bin/pip3 install cython setuptools && \ /env/bin/pip3 install -e . && \ /env/bin/python3 setup.py develop && \ HOME=~judge . ~judge/.profile && \ diff --git a/.docker/tier2/Dockerfile b/.docker/tier2/Dockerfile index d809418e1..7d3239b85 100644 --- a/.docker/tier2/Dockerfile +++ b/.docker/tier2/Dockerfile @@ -4,7 +4,7 @@ ARG TAG=master RUN mkdir /judge /problems && cd /judge && \ curl -L https://github.com/DMOJ/judge-server/archive/"${TAG}".tar.gz | tar -xz --strip-components=1 && \ python3 -m venv --prompt=DMOJ /env && \ - /env/bin/pip3 install cython && \ + /env/bin/pip3 install cython setuptools && \ /env/bin/pip3 install -e . && \ /env/bin/python3 setup.py develop && \ HOME=~judge . ~judge/.profile && \ diff --git a/.docker/tier3/Dockerfile b/.docker/tier3/Dockerfile index a1287bd2d..671b32b39 100644 --- a/.docker/tier3/Dockerfile +++ b/.docker/tier3/Dockerfile @@ -4,7 +4,7 @@ ARG TAG=master RUN mkdir /judge /problems && cd /judge && \ curl -L https://github.com/DMOJ/judge-server/archive/"${TAG}".tar.gz | tar -xz --strip-components=1 && \ python3 -m venv --prompt=DMOJ /env && \ - /env/bin/pip3 install cython && \ + /env/bin/pip3 install cython setuptools && \ /env/bin/pip3 install -e . && \ /env/bin/python3 setup.py develop && \ HOME=~judge . ~judge/.profile && \