setup.py 文件源码

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

项目:PyFunt 作者: dnlcrl 项目源码 文件源码
def get_version_info():
    # Adding the git rev number needs to be done inside
    # write_version_py(), otherwise the import of pyfunt.version messes
    # up the build under Python 3.
    FULLVERSION = VERSION
    if os.path.exists('.git'):
        GIT_REVISION = git_version()
    elif os.path.exists('pyfunt/version.py'):
        # must be a source distribution, use existing version file
        # load it as a separate module to not load pyfunt/__init__.py
        import imp
        version = imp.load_source('pyfunt.version', 'pyfunt/version.py')
        GIT_REVISION = version.git_revision
    else:
        GIT_REVISION = "Unknown"

    if not ISRELEASED:
        FULLVERSION += '.dev0+' + GIT_REVISION[:7]

    return FULLVERSION, GIT_REVISION
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号