当前位置: 首页>>代码示例>>Python>>正文


Python versioneer.get_version方法代码示例

本文整理汇总了Python中versioneer.get_version方法的典型用法代码示例。如果您正苦于以下问题:Python versioneer.get_version方法的具体用法?Python versioneer.get_version怎么用?Python versioneer.get_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在versioneer的用法示例。


在下文中一共展示了versioneer.get_version方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_version

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def get_version():
    """Get the short version string for this project."""
    return get_versions()["version"] 
开发者ID:spencerahill,项目名称:aospy,代码行数:5,代码来源:versioneer.py

示例2: scan_setup_py

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def scan_setup_py():
    """Validate the contents of setup.py against Versioneer's expectations."""
    found = set()
    setters = False
    errors = 0
    with open("setup.py", "r") as f:
        for line in f.readlines():
            if "import versioneer" in line:
                found.add("import")
            if "versioneer.get_cmdclass()" in line:
                found.add("cmdclass")
            if "versioneer.get_version()" in line:
                found.add("get_version")
            if "versioneer.VCS" in line:
                setters = True
            if "versioneer.versionfile_source" in line:
                setters = True
    if len(found) != 3:
        print("")
        print("Your setup.py appears to be missing some important items")
        print("(but I might be wrong). Please make sure it has something")
        print("roughly like the following:")
        print("")
        print(" import versioneer")
        print(" setup( version=versioneer.get_version(),")
        print("        cmdclass=versioneer.get_cmdclass(),  ...)")
        print("")
        errors += 1
    if setters:
        print("You should remove lines like 'versioneer.VCS = ' and")
        print("'versioneer.versionfile_source = ' . This configuration")
        print("now lives in setup.cfg, and should be removed from setup.py")
        print("")
        errors += 1
    return errors 
开发者ID:spencerahill,项目名称:aospy,代码行数:37,代码来源:versioneer.py

示例3: get_version

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def get_version(verbose=False):
    return get_versions(verbose=verbose)["version"] 
开发者ID:matthew-brett,项目名称:delocate,代码行数:4,代码来源:versioneer.py

示例4: run

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def run(self):
        ver = get_version(verbose=True)
        print("Version is currently: %s" % ver) 
开发者ID:matthew-brett,项目名称:delocate,代码行数:5,代码来源:versioneer.py

示例5: get_version

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def get_version():
    return get_versions()["version"] 
开发者ID:menpo,项目名称:landmarkerio-server,代码行数:4,代码来源:versioneer.py

示例6: scan_setup_py

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def scan_setup_py():
    found = set()
    setters = False
    errors = 0
    with open("setup.py", "r") as f:
        for line in f.readlines():
            if "import versioneer" in line:
                found.add("import")
            if "versioneer.get_cmdclass()" in line:
                found.add("cmdclass")
            if "versioneer.get_version()" in line:
                found.add("get_version")
            if "versioneer.VCS" in line:
                setters = True
            if "versioneer.versionfile_source" in line:
                setters = True
    if len(found) != 3:
        print("")
        print("Your setup.py appears to be missing some important items")
        print("(but I might be wrong). Please make sure it has something")
        print("roughly like the following:")
        print("")
        print(" import versioneer")
        print(" setup( version=versioneer.get_version(),")
        print("        cmdclass=versioneer.get_cmdclass(),  ...)")
        print("")
        errors += 1
    if setters:
        print("You should remove lines like 'versioneer.VCS = ' and")
        print("'versioneer.versionfile_source = ' . This configuration")
        print("now lives in setup.cfg, and should be removed from setup.py")
        print("")
        errors += 1
    return errors 
开发者ID:menpo,项目名称:landmarkerio-server,代码行数:36,代码来源:versioneer.py

示例7: get_version

# 需要导入模块: import versioneer [as 别名]
# 或者: from versioneer import get_version [as 别名]
def get_version():
    path = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), "datasette", "version.py"
    )
    g = {}
    exec(open(path).read(), g)
    return g["__version__"] 
开发者ID:simonw,项目名称:datasette,代码行数:9,代码来源:setup.py


注:本文中的versioneer.get_version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。