Python version.get_version() Examples

The following are 3 code examples of version.get_version(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module version , or try the search function .
Example #1
Source File: setup.py    From chemcoord with GNU Lesser General Public License v3.0 6 votes vote down vote up
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,
    ) 
Example #2
Source File: version.py    From pygtrie with Apache License 2.0 5 votes vote down vote up
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 
Example #3
Source File: cli.py    From webdrivermanager with MIT License 5 votes vote down vote up
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()