Extracts the version number from the version.py file.
962071
def get_version():
    """"""
    VERSION_FILE = '../malcolm/version.py'
    mo = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
                   open(VERSION_FILE, 'rt').read(), re.M)
    if mo:
        return mo.group(1)
    else:
        raise RuntimeError(
            'Unable to find version string in {0}.'.format(VERSION_FILE))
965835
def get_versions():
    """"""
    # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
    # __file__, we can work backwards from there to the root. Some
    # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
    # case we can only use expanded keywords.

    cfg = get_config()
    verbose = cfg.verbose

    try:
        return git_versions_from_keywords(get_keywords(), cfg.tag_prefix,
                                          verbose)
    except NotThisMethod:
        pass

    try:
        root = os.path.realpath(__file__)
        # versionfile_source is the relative path from the top of the source
        # tree (where the .git directory might live) to this file. Invert
        # this to find the root from __file__.
        for i in cfg.versionfile_source.split('/'):
            root = os.path.dirname(root)
    except NameError:
        return {"version": "0+unknown", "full-revisionid": None,
                "dirty": None,
                "error": "unable to find root of source tree"}

    try:
        pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
        return render(pieces, cfg.style)
    except NotThisMethod:
        pass

    try:
        if cfg.parentdir_prefix:
            return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
    except NotThisMethod:
        pass

    _version_path = os.path.join(os.path.dirname(__file__), '_version')
    if os.path.exists(_version_path):
        with open(_version_path) as f:
            l = f.readline().strip()
            return {
                'version': l,
                'error': None,
                'dirty': None,
                'full-revisionid': l
            }

    return {"version": "0+unknown", "full-revisionid": None,
            "dirty": None,
            "error": "unable to compute version"}
791246
def get_version():
	
	version_py = os.path.join(os.path.dirname(__file__), 'deepgram', 'version.py')
	with open(version_py, 'r') as fh:
		for line in fh:
			if line.startswith('__version__'):
				return line.split('=')[-1].strip().replace('"', '')
	raise ValueError('Failed to parse version from: {}'.format(version_py))
859477
def get_version(module):
    
    version_names = ["__version__", "get_version", "version"]
    version_names.extend([name.upper() for name in version_names])
    for name in version_names:
        try:
            version = getattr(module, name)
        except AttributeError:
            continue
        if callable(version):
            version = version()
        try:
            version = ".".join([str(i) for i in version.__iter__()])
        except AttributeError:
            pass
        return version
334150
def get_version():
    """"""
    release = get_release()
    split_version = release.split(".")
    if len(split_version) == 3:
        return ".".join(split_version[:2])
    return release
685047
def get_version():
    
    try:
        f = open('version.txt')
    except IOError:
        os.system("./version.sh > version.txt")
        f = open('version.txt')
    version = ''.join(f.readlines()).rstrip()
    f.close()
    return version
608712
def get_version(filename='scanf.py'):
    
    version = '' 
    with open(filename, 'r') as fp:
        for line in fp:
            m = re.search('__version__ .* ''(.*)''', line)
            if m is not None:
                version = (m.group(1)).strip('\'')
                break
    return version
1090700
def get_version(filepath='src/birding/version.py'):
    """"""
    with open(get_abspath(filepath)) as version_file:
        return re.search(
            r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""",
            version_file.read()).group('version')
482330
def read_version():
    ""
    version_file = local_file('source', 'added_value', 'version.py')
    local_vars = {}
    with open(version_file) as handle:
        exec(handle.read(), {}, local_vars)  # pylint: disable=exec-used
    return local_vars['__version__']
1111006
def version(self) -> str:
        ''''''
        output, _ = self._execute('version')
        return output.splitlines()[0].split()[-1]
1252562
def get_version():
    
    with open('sj.py') as source:
        for node in ast.walk(ast.parse(source.read(), 'sj.py')):
            if node.__class__.__name__ == 'Assign' and \
               node.targets[0].__class__.__name__ == 'Name' and \
               node.targets[0].id == '__version__':
                return node.value.s
304145
def get_version(package):
    
    init_py = codecs.open(os.path.join(package, '__init__.py'), encoding='utf-8').read()
    return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)
604943
def get_versions():
    """"""
    # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
    # __file__, we can work backwards from there to the root. Some
    # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
    # case we can only use expanded keywords.

    cfg = get_config()
    verbose = cfg.verbose

    try:
        return git_versions_from_keywords(get_keywords(), cfg.tag_prefix,
                                          verbose)
    except NotThisMethod:
        pass

    root = os.path.realpath(__file__)

    root_dir = os.path.dirname(root)
    if os.path.isfile(os.path.join(root_dir, 'VERSION')):
        with open(os.path.join(root_dir, 'VERSION')) as vfile:
            version = vfile.readline().strip()

        return {
            "version": version,
            "full-revisionid": None,
            "dirty": None,
            "error": None,
            "date": None
        }

    try:
        # versionfile_source is the relative path from the top of the source
        # tree (where the .git directory might live) to this file. Invert
        # this to find the root from __file__.
        for i in cfg.versionfile_source.split('/'):
            root = os.path.dirname(root)
    except NameError:
        return {"version": "0+unknown", "full-revisionid": None,
                "dirty": None,
                "error": "unable to find root of source tree",
                "date": None}

    try:
        pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
        return render(pieces, cfg.style)
    except NotThisMethod:
        pass

    try:
        if cfg.parentdir_prefix:
            return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
    except NotThisMethod:
        pass

    return {"version": "0+unknown", "full-revisionid": None,
            "dirty": None,
            "error": "unable to compute version", "date": None}
995537
def get_version():
    
    version_file = os.path.join(PKG, 'lib/version.py')
    ver_str_line = open(version_file, "rt").read()
    version_regex = r'^__version__ = [\'"]([^\'"]*)[\'"]'
    mo = re.search(version_regex, ver_str_line, re.M)
    if mo:
        return mo.group(1)
    else:
        raise RuntimeError('Unable to find version string in %s.'
                           % (version_file,))
584113
def get_version(*file_paths):
    """"""
    filename = os.path.join(os.path.dirname(__file__), *file_paths)
    print("Looking for version in: {}".format(filename))
    version_file = open(filename).read()
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError('Unable to find version string.')
948217
def get_version():
    
    contents = read(os.path.join(PATH_BASE, 'srptools', '__init__.py'))
    version = re.search('VERSION = \(([^)]+)\)', contents)
    version = version.group(1).replace(', ', '.').strip()
    return version
1034818
def read_version():
    """"""
    finder = VersionFinder()
    finder.visit(ast.parse(local_file('curdling', 'version.py')))
    return finder.version