(args)
return lpaths, libs, other
Split a list of link arguments into three lists:
        * library search paths
        * library filenames (or paths)
        * other link arguments
Split a list of link arguments into three lists:
        * library search paths
        * library filenames (or paths)
        * other link arguments
Split a list of link arguments into three lists : * library search paths * library filenames ( or paths ) * other link arguments
def split_link_args(args):
        """
        Split a list of link arguments into three lists:
        * library search paths
        * library filenames (or paths)
        * other link arguments
        """
        lpaths = []
        libs = []
        other = []
        for arg in args:
            if arg.startswith('/LIBPATH:'):
                lpath = arg[9:]
                # De-dup library search paths by removing older entries when
                # a new one is found. This is necessary because unlike other
                # search paths such as the include path, the library is
                # searched for in the newest (right-most) search path first.
                if lpath in lpaths:
                    lpaths.remove(lpath)
                lpaths.append(lpath)
            elif arg.startswith(('/', '-')):
                other.append(arg)
            # It's ok if we miss libraries with non-standard extensions here.
            # They will go into the general link arguments.
            elif arg.endswith('.lib') or arg.endswith('.a'):
                # De-dup
                if arg not in libs:
                    libs.append(arg)
            else:
                other.append(arg)
        return lpaths, libs, other
def split_link_args ( args ) : lpaths = [ ] libs = [ ] other = [ ] for arg in args : if arg . startswith ( '/LIBPATH:' ) : lpath = arg [ 9 : ] # De-dup library search paths by removing older entries when # a new one is found. This is necessary because unlike other # search paths such as the include path, the library is # searched for in the newest (right-most) search path first. if lpath in lpaths : lpaths . remove ( lpath ) lpaths . append ( lpath ) elif arg . startswith ( ( '/' , '-' ) ) : other . append ( arg ) # It's ok if we miss libraries with non-standard extensions here. # They will go into the general link arguments. elif arg . endswith ( '.lib' ) or arg . endswith ( '.a' ) : # De-dup if arg not in libs : libs . append ( arg ) else : other . append ( arg ) return lpaths , libs , other