bpo-43425: Update _osx_support not to use distutils.log (GH-26968) · python/cpython@94a4136 (original) (raw)

Original file line number Diff line number Diff line change
@@ -428,10 +428,9 @@ def compiler_fixup(compiler_so, cc_args):
428 428 break
429 429
430 430 if sysroot and not os.path.isdir(sysroot):
431 -from distutils import log
432 -log.warn("Compiling with an SDK that doesn't seem to exist: %s",
433 -sysroot)
434 -log.warn("Please check your Xcode installation")
431 +sys.stderr.write(f"Compiling with an SDK that doesn't seem to exist: {sysroot}\n")
432 +sys.stderr.write("Please check your Xcode installation\n")
433 +sys.stderr.flush()
435 434
436 435 return compiler_so
437 436