From a10634e13f1f7587028dd057d763f0d272442817 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 26 Jul 2020 14:59:30 +1000 Subject: [PATCH] Do not explicitly import distutils --- Tests/test_image_access.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 9a3af9e53..57612c4b0 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -3,7 +3,8 @@ import os import subprocess import sys import sysconfig -from distutils import ccompiler + +from setuptools.command.build_ext import new_compiler import pytest from PIL import Image @@ -360,7 +361,7 @@ int main(int argc, char* argv[]) % sys.prefix.replace("\\", "\\\\") ) - compiler = ccompiler.new_compiler() + compiler = new_compiler() compiler.add_include_dir(sysconfig.get_config_var("INCLUDEPY")) libdir = sysconfig.get_config_var("LIBDIR") or sysconfig.get_config_var(