code: def build_extension(self, ext):
      extdir = os.path.abspath(
          os.path.dirname(self.get_ext_fullpath(ext.name))
      )
      cmake_args = [
          "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
          "-DPYTHON_EXECUTABLE=" + sys.executable,
          "-DBUILD_DELTA_INFER_PYTHON=ON",
          "-DCMAKE_INSTALL_RPATH=$ORIGIN",
      ]
  
      BuildWithDebug = "ON" if self.debug else "OFF"
      BuildMode = "Debug" if self.debug else "Release"
      build_args = ["--config", BuildMode]
  
      if platform.system() == "Windows":
          cmake_args += [
              "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(
                  BuildMode.upper(), extdir
              )
          ]
          if sys.maxsize > 2**32:
              cmake_args += ["-A", "x64"]
          build_args += ["--", "/m"]
      else:
          # cmake_args += ['-DBUILD_DEBUG=' + BuildWithDebug]
          cmake_args += ["-DBUILD_DEBUG=" + "ON"]
          build_args += ["--", "-j8"]
  
      env = os.environ.copy()
      env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format(
          env.get("CXXFLAGS", ""), self.distribution.get_version()
      )
      if not os.path.exists(self.build_temp):
          os.makedirs(self.build_temp)
      subprocess.check_call(
          ["cmake", ext.sourcedir] + cmake_args,
          cwd=self.build_temp,
          env=env,
      )
      subprocess.check_call(
          ["cmake", "--build", "."] + build_args, cwd=self.build_temp
      )
  
file_path: delta/gcompiler/python/setup.py
imports: import os
  import sys
  import re
  import platform
  import subprocess
  from setuptools import setup, Extension, find_packages
  from setuptools.command.build_ext import build_ext
  from distutils.version import LooseVersion
label_desc: Use image node_id 2 for calling the DeltaExtBuild obj's underlying member method code with example usage: obj.build_extension(ext) without return types