def METHOD_NAME(obj, src, ext, cc_args, extra_postargs, pp_opts):
    if os.path.splitext(src)[1] == '.cu':
        # use the cuda for .cu files
        self.set_executable('compiler_so', CUDA['nvcc'])
        # use only a subset of the extra_postargs, which are 1-1 translated
        # from the extra_compile_args in the Extension class
        postargs = extra_postargs['nvcc']
    else:
        postargs = extra_postargs['gcc']
    super(obj, src, ext, cc_args, postargs, pp_opts)
    # reset the default compiler_so, which we might have changed for cuda
    self.compiler_so = default_compiler_so