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(