provenance.py 文件源码

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

项目:r5 作者: benureau 项目源码 文件源码
def provenance(dirty=False):
    """Return provenance data about the execution environment.

    :param dirty:  if False, will exit with an error if the git repository
                   is dirty or absent.
    """
    return {'python'   : {'implementation': platform.python_implementation(),
                                'version' : platform.python_version_tuple(),
                                'compiler': platform.python_compiler(),
                                'branch'  : platform.python_branch(),
                                'revision': platform.python_revision()},
            'platform'  : platform.platform(),
            'packages'  : list(pip.commands.freeze.freeze()), # list of installed packages
            'git_info'  : git_info(dirty_allowed=dirty),
            'timestamp' : datetime.utcnow().isoformat()+'Z',  # Z stands for UTC
           }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号