Do not explicitly import distutils

This commit is contained in:
Andrew Murray 2020-07-26 14:59:30 +10:00
parent 42bb401e88
commit a10634e13f

View File

@ -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(