get version information in the form 'v1.2.3 (RC)', or None if version
        tag either not found or it's a development version
519736
def get_version_info_str(self, key_name='ver_sw_release'):
        
        version = self.get_version_info(key_name)
        if not version is None and version[3] >= 64:
            type_str = ''
            if version[3] < 128: type_str = ' (alpha)'
            elif version[3] < 192: type_str = ' (beta)'
            elif version[3] < 255: type_str = ' (RC)'
            return 'v{}.{}.{}{}'.format(version[0], version[1], version[2], type_str)
        return None
996493
def _get_version():
    """"""
    with open("../waliki/__init__.py") as fh:
        for line in fh:
            if line.startswith("__version__ = "):
                return line.split("=")[-1].strip().strip("'").strip('"')
1044886
def _get_version():
    """"""

    with open(join(dirname(__file__), '{{project.package}}/VERSION'), 'rb') as f:
        version = f.read().decode('ascii').strip()
    return version
769396
def _get_version():
    '''
    
    '''
    version_string = __salt__['cmd.run'](
        [_check_xbps(), '--version'],
        output_loglevel='trace')
    if version_string is None:
        # Dunno why it would, but...
        return False

    VERSION_MATCH = re.compile(r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)')
    version_match = VERSION_MATCH.search(version_string)
    if not version_match:
        return False

    return version_match.group(1).split('.')
1106006
def get_version(version):
    """"""
    if len(version) > 2 and version[2] is not None:
        if isinstance(version[2], int):
            str_version = "%s.%s.%s" % version[:3]
        else:
            str_version = "%s.%s_%s" % version[:3]
    else:
        str_version = "%s.%s" % version[:2]

    return str_version
1310486
def get_version():
    """"""
    import ast

    with open(os.path.join("cyvcf2", "__init__.py"), "r") as init_file:
      module = ast.parse(init_file.read())

    version = (ast.literal_eval(node.value) for node in ast.walk(module)
         if isinstance(node, ast.Assign)
         and node.targets[0].id == "__version__")
    try:
      return next(version)
    except StopIteration:
          raise ValueError("version could not be located")
478970
def find_version():
    """"""
    version_file = read_file('__init__.py')
    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.')
1114572
def get_version():
    """"""
    if isinstance(VERSION[-1], str):
        return '.'.join(map(str, VERSION[:-1])) + VERSION[-1]
    return '.'.join(map(str, VERSION))
46448
def get_version_from_tag(tag_name: str) -> Optional[str]:
    

    debug('get_version_from_tag({})'.format(tag_name))
    check_repo()
    for i in repo.tags:
        if i.name == tag_name:
            return i.commit.hexsha
    return None
404554
def get_version(package_name, version_file='_version.py'):
    """"""
    filename = os.path.join(os.path.dirname(__file__), package_name, version_file)
    with open(filename, 'rb') as fp:
        return fp.read().decode('utf8').split('=')[1].strip(" \n'")
570305
def get_version():
    """"""
    proc = subprocess.Popen(
        ("git", "describe", "--tag", "--always"), 
        stdout=subprocess.PIPE, stderr=subprocess.STDOUT
    )
    output, _ = proc.communicate()
    result = output.decode("utf-8").strip()
    if proc.returncode != 0:
        sys.stderr.write(
            ">>> Git Describe Error:\n    " +
            result
        )
        return "1+unknown"
    split = result.split("-", 1)
    version = "+".join(split).replace("-", ".")

    if len(split) > 1:
        sys.stderr.write(
            ">>> Please verify the commit tag:\n    " +
            version + "\n"
        )
    return version
100287
def get_previous_version(self):
        """"""
        gh = self.get_github_api()
        repo = gh.repository(self.repo_owner, self.repo_name)
        most_recent = None
        for release in repo.releases():
            # Return the second release that matches the release prefix
            if release.tag_name.startswith(self.project__git__prefix_release):
                if most_recent is None:
                    most_recent = release
                else:
                    return LooseVersion(self.get_version_for_tag(release.tag_name))
127536
def get_version(*args):
    """"""
    contents = get_contents(*args)
    metadata = dict(re.findall('__([a-z]+)__ = [\'"]([^\'"]+)', contents))
    return metadata['version']
1320091
def get_version(self):
        
        if not self.node.version:
            return None
        try:
            version = smart_str('%s' % self.node.version.resolve(self.context))
        except template.VariableDoesNotExist:
            raise template.TemplateSyntaxError('"%s" tag got an unknown variable: %r' %
                                               (self.node.nodename, self.node.version.var))

        return '%s' % version
719532
def get_modules_info():
    """"""
    module_infos = []
    for (mod, name, version_attr) in Modules:
        if not fileutil.has_module(mod):
            continue
        if hasattr(mod, version_attr):
            attr = getattr(mod, version_attr)
            version = attr() if callable(attr) else attr
            module_infos.append("%s %s" % (name, version))
        else:
            # ignore attribute errors in case library developers
            # change the version information attribute
            module_infos.append(name)
    return u"Modules: %s" % (u", ".join(module_infos))
304752
def check_version(self, check, timeout=None, metadata=None,
                      credentials=None):
        """"""
        return self.stub.CheckVersion(check, timeout=timeout,
                                      metadata=metadata,
                                      credentials=credentials)
1191602
def find_version(fname):
    
    version = ""
    with open(fname, "r") as fp:
        reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
        for line in fp:
            m = reg.match(line)
            if m:
                version = m.group(1)
                break
    if not version:
        raise RuntimeError("Cannot find version information")
    return version