(self, args: T.List[str])
return converted
Both MSVC and native Python on Windows cannot handle MinGW-esque /c/foo
        paths so convert them to C:/foo. We cannot resolve other paths starting
        with / like /home/foo so leave them as-is so that the user gets an
        error/warning from the compiler/linker.
Both MSVC and native Python on Windows cannot handle MinGW-esque /c/foo
        paths so convert them to C:/foo. We cannot resolve other paths starting
        with / like /home/foo so leave them as-is so that the user gets an
        error/warning from the compiler/linker.
Both MSVC and native Python on Windows cannot handle MinGW - esque / c / foo paths so convert them to C : / foo . We cannot resolve other paths starting with / like / home / foo so leave them as - is so that the user gets an error / warning from the compiler / linker .
def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
        '''
        Both MSVC and native Python on Windows cannot handle MinGW-esque /c/foo
        paths so convert them to C:/foo. We cannot resolve other paths starting
        with / like /home/foo so leave them as-is so that the user gets an
        error/warning from the compiler/linker.
        '''
        if not self.env.machines.build.is_windows():
            return args
        converted = []
        for arg in args:
            pargs: T.Tuple[str, ...] = tuple()
            # Library search path
            if arg.startswith('-L/'):
                pargs = PurePath(arg[2:]).parts
                tmpl = '-L{}:/{}'
            elif arg.startswith('-I/'):
                pargs = PurePath(arg[2:]).parts
                tmpl = '-I{}:/{}'
            # Full path to library or .la file
            elif arg.startswith('/'):
                pargs = PurePath(arg).parts
                tmpl = '{}:/{}'
            elif arg.startswith(('-L', '-I')) or (len(arg) > 2 and arg[1] == ':'):
                # clean out improper '\\ ' as comes from some Windows pkg-config files
                arg = arg.replace('\\ ', ' ')
            if len(pargs) > 1 and len(pargs[1]) == 1:
                arg = tmpl.format(pargs[1], '/'.join(pargs[2:]))
            converted.append(arg)
        return converted
def _convert_mingw_paths ( self , args : T . List [ str ] ) -> T . List [ str ] : if not self . env . machines . build . is_windows ( ) : return args converted = [ ] for arg in args : pargs : T . Tuple [ str , ... ] = tuple ( ) # Library search path if arg . startswith ( '-L/' ) : pargs = PurePath ( arg [ 2 : ] ) . parts tmpl = '-L{}:/{}' elif arg . startswith ( '-I/' ) : pargs = PurePath ( arg [ 2 : ] ) . parts tmpl = '-I{}:/{}' # Full path to library or .la file elif arg . startswith ( '/' ) : pargs = PurePath ( arg ) . parts tmpl = '{}:/{}' elif arg . startswith ( ( '-L' , '-I' ) ) or ( len ( arg ) > 2 and arg [ 1 ] == ':' ) : # clean out improper '\\ ' as comes from some Windows pkg-config files arg = arg . replace ( '\\ ' , ' ' ) if len ( pargs ) > 1 and len ( pargs [ 1 ] ) == 1 : arg = tmpl . format ( pargs [ 1 ] , '/' . join ( pargs [ 2 : ] ) ) converted . append ( arg ) return converted