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


Python version.get_version方法代码示例

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


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

示例1: setup_package

# 需要导入模块: import version [as 别名]
# 或者: from version import get_version [as 别名]
def setup_package():
    setup(
        name=MAIN_PACKAGE,
        version=version.get_version(pep440=True),
        url=URL,
        description=DESCRIPTION,
        author=AUTHOR,
        author_email=EMAIL,
        include_package_data=True,
        keywords=KEYWORDS,
        license=LICENSE,
        long_description=readme(),
        classifiers=CLASSIFIERS,
        packages=find_packages('src'),
        package_dir={'': 'src'},
        install_requires=INSTALL_REQUIRES,
    ) 
开发者ID:mcocdawc,项目名称:chemcoord,代码行数:19,代码来源:setup.py

示例2: get_version

# 需要导入模块: import version [as 别名]
# 或者: from version import get_version [as 别名]
def get_version():
    """Figures out package's version; also stores it in a file."""
    version = read_git_version()
    release_version = read_release_version(not version)
    version = version or release_version
    if not version:
        raise ValueError('Cannot find the version number')
    if version != release_version:
        write_release_version(version)
    return version 
开发者ID:google,项目名称:pygtrie,代码行数:12,代码来源:version.py

示例3: parse_command_line

# 需要导入模块: import version [as 别名]
# 或者: from version import get_version [as 别名]
def parse_command_line():
    parser = argparse.ArgumentParser(
        description='Tool for downloading and installing WebDriver binaries. Version: {}'.format(get_version()),
    )
    parser.add_argument('browser', help='Browser to download the corresponding WebDriver binary.  Valid values are: {0}. Optionally specify a version number of the WebDriver binary as follows: \'browser:version\' e.g. \'chrome:2.39\'.  If no version number is specified, the latest available version of the WebDriver binary will be downloaded.'.format(', '.join(DOWNLOADERS.keys())), nargs='+')
    parser.add_argument('--downloadpath', '-d', action='store', dest='downloadpath', metavar='F', default=None, help='Where to download the webdriver binaries')
    parser.add_argument('--linkpath', '-l', action='store', dest='linkpath', metavar='F', default=None, help='Where to link the webdriver binary to. Set to "AUTO" if you need some intelligense to decide where to place the final webdriver binary. If set to "SKIP", no link/copy done.')
    parser.add_argument('--os', '-o', action='store', dest='os_name', choices=OS_NAMES, metavar='OSNAME', default=None, help='Overrides os detection with given os name. Values: {0}'.format(', '.join(OS_NAMES)))
    parser.add_argument('--bitness', '-b', action='store', dest='bitness', choices=BITNESS, metavar='BITS', default=None, help='Overrides bitness detection with given value. Values: {0}'.format(', '.join(BITNESS)))
    parser.add_argument('--version', action='version', version='%(prog)s {}'.format(get_version()))
    return parser.parse_args() 
开发者ID:rasjani,项目名称:webdrivermanager,代码行数:13,代码来源:cli.py


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