egg_info.py 文件源码

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

项目:noc-orchestrator 作者: DirceuSilvaLabs 项目源码 文件源码
def _add_egg_info(self, cmd):
        """
        Add paths for egg-info files for an external egg-base.

        The egg-info files are written to egg-base. If egg-base is
        outside the current working directory, this method
        searchs the egg-base directory for files to include
        in the manifest. Uses distutils.filelist.findall (which is
        really the version monkeypatched in by setuptools/__init__.py)
        to perform the search.

        Since findall records relative paths, prefix the returned
        paths with cmd.egg_base, so add_default's include_pattern call
        (which is looking for the absolute cmd.egg_info) will match
        them.
        """
        if cmd.egg_base == os.curdir:
            # egg-info files were already added by something else
            return

        discovered = distutils.filelist.findall(cmd.egg_base)
        resolved = (os.path.join(cmd.egg_base, path) for path in discovered)
        self.filelist.allfiles.extend(resolved)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号