scripts/deps.py
def list_dependencies(filename, source):
    """
    Returns a list of all dependencies (including `macro_use` externs) and renames used in the given file.
    :param filename: File to scan
    :param source: Source directory required for absolute path
    :return: A dict in the form:
    {
        'dependencies': [<list of dependencies (always absolute paths, local names)>],
        'renames': {
            <local_name>: <real_name>,
            ...
        },

    }
    """
    current_path = path_from_filename(filename, source)

    with open(filename, 'rt') as f:
        content = f.read()

    extern_crates = find_extern_crates(content)

    dependencies = map(uncompress_dependencies, dependency.findall(content))
    dependencies = functools.reduce(operator.iconcat, dependencies, extern_crates['macro_use'])
    dependencies = map(lambda x: absolute_path(x, current_path), dependencies)
    return {
        'dependencies': dependencies,
        'renames': extern_crates['renames'],
    }

    Returns a list of all dependencies (including `macro_use` externs) and renames used in the given file.
    :param filename: File to scan
    :param source: Source directory required for absolute path
    :return: A dict in the form:
    {
        'dependencies': [<list of dependencies (always absolute paths, local names)>],
        'renames': {
            <local_name>: <real_name>,
            ...
        },

    }
    
Returns a list of all dependencies (including `macro_use` externs) and renames used in the given file.
Returns a list of all dependencies ( including ` macro_use ` externs ) and renames used in the given file .
def list_dependencies(filename, source):
    current_path = path_from_filename(filename, source)
    with open(filename, 'rt') as f:
        content = f.read()
    extern_crates = find_extern_crates(content)
    dependencies = map(uncompress_dependencies, dependency.findall(content))
    dependencies = functools.reduce(operator.iconcat, dependencies, extern_crates['macro_use'])
    dependencies = map(lambda x: absolute_path(x, current_path), dependencies)
    return {
        'dependencies': dependencies,
        'renames': extern_crates['renames'],
    }
def list_dependencies ( filename , source ) : current_path = path_from_filename ( filename , source ) with open ( filename , 'rt' ) as f : content = f . read ( ) extern_crates = find_extern_crates ( content ) dependencies = map ( uncompress_dependencies , dependency . findall ( content ) ) dependencies = functools . reduce ( operator . iconcat , dependencies , extern_crates [ 'macro_use' ] ) dependencies = map ( lambda x : absolute_path ( x , current_path ) , dependencies ) return { 'dependencies' : dependencies , 'renames' : extern_crates [ 'renames' ] , }
Returns a list of all dependencies (including `macro_use` externs) and renames used in the given file.
Returns a list of all dependencies ( including ` macro_use ` externs ) and renames used in the given file .
"""
    Returns a list of all dependencies (including `macro_use` externs) and renames used in the given file.
    :param filename: File to scan
    :param source: Source directory required for absolute path
    :return: A dict in the form:
    {
        'dependencies': [<list of dependencies (always absolute paths, local names)>],
        'renames': {
            <local_name>: <real_name>,
            ...
        },

    }
    """
A dict in the form:
{
'dependencies': [],
'renames': {
: ,

}.


A dict in the form : { ' dependencies ' : [] ' renames ' : { : } .
filename
File to scan
File to scan
source
Source directory required for absolute path
Source directory required for absolute path