setup.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:jx-sqlite 作者: mozilla 项目源码 文件源码
def find_packages(where='.', lib_prefix='', exclude=()):
    """
    SNAGGED FROM distribute-0.6.49-py2.7.egg/setuptools/__init__.py
    """
    out = []
    stack = [(convert_path(where), lib_prefix)]
    while stack:
        where, prefix = stack.pop(0)
        for name in os.listdir(where):
            fn = os.path.join(where,name)
            if ('.' not in name and os.path.isdir(fn) and
                os.path.isfile(os.path.join(fn, '__init__.py'))
            ):
                out.append(prefix + name); stack.append((fn, prefix+name + '.'))
    for pat in list(exclude)+['ez_setup', 'distribute_setup']:
        from fnmatch import fnmatchcase
        out = [item for item in out if not fnmatchcase(item, pat)]
    return out
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号