The distutils module from the standard library is deprecated and will
be removed in Python 3.12, and PEP 632 recommends using
distutils.ccompiler from setuptools, instead.
This code should eventually be rewritten to use zig-pypi, but for now
this suffices.
import tempfile
import sysconfig
import os.path
-from distutils import ccompiler
+from setuptools import distutils
__all__ = ["build_cxx"]
# the output directory directly.
os.chdir(build_dir.name)
- cc_driver = ccompiler.new_compiler()
+ cc_driver = distutils.ccompiler.new_compiler()
cc_driver.output_dir = "."
cc = sysconfig.get_config_var("CC")