@@ -75,9 +75,7 @@ def determine_generator_args():
75
75
if sys .platform == 'win32' :
76
76
try :
77
77
# See which compiler python picks
78
- from setuptools ._distutils import ccompiler # We use ccompiler on windows to determine the msvc version
79
- compiler = ccompiler .new_compiler ()
80
- compiler .initialize ()
78
+ compiler = setuptools ._distutils .ccompiler .new_compiler ()
81
79
82
80
# Look at compiler path to divine the Visual Studio version.
83
81
# This technique may not work with customized VS install paths.
@@ -324,7 +322,6 @@ def awscrt_ext():
324
322
libraries .reverse ()
325
323
326
324
if sys .platform == 'win32' :
327
- from setuptools ._distutils import ccompiler # We use ccompiler on windows to determine the msvc version
328
325
# the windows apis being used under the hood. Since we're static linking we have to follow the entire chain down
329
326
libraries += ['Secur32' , 'Crypt32' , 'Advapi32' , 'NCrypt' , 'BCrypt' , 'Kernel32' , 'Ws2_32' , 'Shlwapi' ]
330
327
# Ensure that debug info is in the obj files, and that it is linked into the .pyd so that
@@ -373,7 +370,7 @@ def awscrt_ext():
373
370
# rare cases where that didn't happen, so let's be explicit.
374
371
extra_link_args += ['-pthread' ]
375
372
376
- if sys .platform != 'win32' or ccompiler .get_default_compiler () != 'msvc' :
373
+ if sys .platform != 'win32' or setuptools . _distutils . ccompiler .get_default_compiler () != 'msvc' :
377
374
extra_compile_args += ['-Wno-strict-aliasing' , '-std=gnu99' ]
378
375
379
376
# treat warnings as errors in development mode
0 commit comments