def sorted_walk(dir):
    """Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    """
    for base, dirs, files in os.walk(dir):
        dirs.sort()
        files.sort()
        yield base, dirs, files
Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    
product/gradle-plugin/src/main/python/setuptools/command/bdist_egg.py