當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。