(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
Compiles the source by spawning GCC and windres if needed.
Compiles the source by spawning GCC and windres if needed.
Compiles the source by spawning GCC and windres if needed .
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compiles the source by spawning GCC and windres if needed."""
        if ext == '.rc' or ext == '.res':
            # gcc needs '.res' and '.rc' compiled to object files !!!
            try:
                self.spawn(["windres", "-i", src, "-o", obj])
            except DistutilsExecError as msg:
                raise CompileError(msg)
        else: # for other files use the C-compiler
            try:
                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
                           extra_postargs)
            except DistutilsExecError as msg:
                raise CompileError(msg)
def _compile ( self , obj , src , ext , cc_args , extra_postargs , pp_opts ) : if ext == '.rc' or ext == '.res' : # gcc needs '.res' and '.rc' compiled to object files !!! try : self . spawn ( [ "windres" , "-i" , src , "-o" , obj ] ) except DistutilsExecError as msg : raise CompileError ( msg ) else : # for other files use the C-compiler try : self . spawn ( self . compiler_so + cc_args + [ src , '-o' , obj ] + extra_postargs ) except DistutilsExecError as msg : raise CompileError ( msg )