def METHOD_NAME(self, ext: setuptools.Extension) -> None:
    ctx = cupy_builder.get_context()
    # Compile "*.cu" files into object files.
    sources_cpp, extra_objects = compile_device_code(ctx, ext)
    # Remove device code from list of sources, and instead add compiled
    # object files to link.
    ext.sources = sources_cpp
    ext.extra_objects += extra_objects
    # Let setuptools do the rest of the build process, i.e., compile
    # "*.cpp" files and link object files generated from "*.cu".
    super().METHOD_NAME(ext)