:View slackbuild packages with version and arch
        args[0] package color
        args[1] package
        args[2] version
        args[3] arch
429145
def view_packages(self, *args):
        
        ver = GetFromInstalled(args[1]).version()
        print("  {0}{1}{2}{3} {4}{5} {6}{7}{8}{9}{10}{11:>11}{12}".format(
            args[0], args[1] + ver, self.meta.color["ENDC"],
            " " * (23-len(args[1] + ver)), args[2],
            " " * (18-len(args[2])), args[3],
            " " * (15-len(args[3])), "",
            "", "SBo", "", "")).rstrip()
868820
def print_package_versions(self):
        """"""
        variants = self.context.get_tool_variants(self.tool_name)
        if variants:
            if len(variants) > 1:
                self._print_conflicting(variants)
                return 1
            else:
                from rez.packages_ import iter_packages
                variant = iter(variants).next()
                it = iter_packages(name=variant.name)
                rows = []
                colors = []

                for pkg in sorted(it, key=lambda x: x.version, reverse=True):
                    if pkg.version == variant.version:
                        name = "* %s" % pkg.qualified_name
                        col = heading
                    else:
                        name = "  %s" % pkg.qualified_name
                        col = local if pkg.is_local else None

                    label = "(local)" if pkg.is_local else ""
                    rows.append((name, pkg.path, label))
                    colors.append(col)

                _pr = Printer()
                for col, line in zip(colors, columnise(rows)):
                    _pr(line, col)
        return 0
202277
def slack_ver():
    
    dist = read_file("/etc/slackware-version")
    sv = re.findall(r"\d+", dist)
    if len(sv) > 2:
        version = (".".join(sv[:2]))
    else:
        version = (".".join(sv))
    return dist.split()[0], version
743479
def list_(env=None, user=None):
    
    cmd = _create_conda_cmd('list', args=['--json'], env=env, user=user)
    ret = _execcmd(cmd, user=user)
    if ret['retcode'] == 0:
        pkg_list = json.loads(ret['stdout'])
        packages = {}
        for pkg in pkg_list:
            pkg_info = pkg.split('-')
            name, version, build = '-'.join(pkg_info[:-2]), pkg_info[-2], pkg_info[-1]
            packages[name] = {'version': version, 'build': build}
        return packages
    else:
        return ret
405383
def index
      validate_arguments!

      app_buildpacks = api.get_app_buildpacks_v3(app)[:body]

      if app_buildpacks.nil? or app_buildpacks.empty?
        display("#{app} has no Buildpack URL set.")
      else
        styled_header("#{app} Buildpack URL#{app_buildpacks.size > 1 ? 's' : ''}")
        display_buildpacks(app_buildpacks.map{|bp| bp["buildpack"]["url"]}, "")
      end
    end
1245866
def version():
    
    echo(green('\nshift-boiler:'))
    echo(green('-' * 40))
    echo(yellow('Version: ') + '{}'.format(boiler_version))
    echo(yellow('GitHub: ') + 'https://github.com/projectshift/shift-boiler')
    echo(yellow('PyPi: ') + 'https://pypi.org/project/shiftboiler/')
    echo()
149725
def pkg_desc(self):
        
        options = [
            "-p",
            "--desc"
        ]
        flag = ["--color="]
        colors = [
            "red",
            "green",
            "yellow",
            "cyan",
            "grey"
        ]
        tag = ""
        for arg in self.args:
            if arg.startswith(flag[0]):
                tag = arg[len(flag[0]):]
                self.args.remove(arg)
                break
        if tag and tag not in colors:
            print("\nslpkg: Error: Available colors {0}\n".format(
                colors))
            raise SystemExit()
        if (len(self.args) == 3 and self.args[0] in options and
                self.args[1] in self.meta.repositories and tag in colors):
            PkgDesc(self.args[2], self.args[1], tag).view()
        elif (len(self.args) == 3 and self.args[0] in options and
                self.args[1] in self.meta.repositories):
            PkgDesc(self.args[2], self.args[1], paint="").view()
        elif (len(self.args) > 1 and self.args[0] in options and
                self.args[1] not in self.meta.repositories):
            usage(self.args[1])
        else:
            usage("")
1057962
def package_list(self, repo, name, INDEX, installed):
        
        tty_size = os.popen("stty size", "r").read().split()
        row = int(tty_size[0]) - 2
        try:
            all_installed_names = []
            index, page, pkg_list = 0, row, []
            r = self.list_lib(repo)
            pkg_list = self.list_greps(repo, r)[0]
            all_installed_names = self.list_of_installed(repo, name)
            print("")
            for pkg in sorted(pkg_list):
                pkg = self._splitting_packages(pkg, repo, name)
                if installed:
                    if repo == "sbo":
                        if pkg in all_installed_names:
                            pkg = ("{0}{1}{2}".format(self.meta.color["GREEN"],
                                                      pkg,
                                                      self.meta.color["ENDC"]))
                    else:
                        if pkg in all_installed_names:
                            pkg = ("{0}{1}{2}".format(self.meta.color["GREEN"],
                                                      pkg,
                                                      self.meta.color["ENDC"]))
                if INDEX:
                    index += 1
                    pkg = self.list_color_tag(pkg)
                    print("{0}{1}:{2} {3}".format(
                        self.meta.color["GREY"], index,
                        self.meta.color["ENDC"], pkg))
                    if index == page:
                        read = raw_input("\nPress {0}Enter{1} to "
                                         "continue... ".format(
                                             self.meta.color["CYAN"],
                                             self.meta.color["ENDC"]))
                        if read in ["Q", "q"]:
                            break
                        print("")   # new line after page
                        page += row
                else:
                    print(pkg)
            print("")   # new line at end
        except EOFError:
            print("")   # new line at exit
            raise SystemExit()
483862
def get_package_version(module_obj, value):
    
    for key in ['version', '__version__']:
        if hasattr(module_obj, key):
            return getattr(module_obj, key)
    parts = value.split('.')
    for index, part in enumerate(parts):
        try:
            return pkg_resources.get_distribution(
                '.'.join(parts[0:index + 1])).version
        except (pkg_resources.DistributionNotFound,
                pkg_resources.RequirementParseError):
            continue
1130792
def get_debug_option(packagename):
    

    try:
        current_debug = get_pkg_version_module(packagename,
                                               fromlist=['debug'])[0]
    except (ImportError, AttributeError):
        current_debug = None

    # Only modify the debug flag if one of the build commands was explicitly
    # run (i.e. not as a sub-command of something else)
    dist = get_dummy_distribution()
    if any(cmd in dist.commands for cmd in ['build', 'build_ext']):
        debug = bool(get_distutils_build_option('debug'))
    else:
        debug = bool(current_debug)

    if current_debug is not None and current_debug != debug:
        build_ext_cmd = dist.get_command_class('build_ext')
        build_ext_cmd._force_rebuild = True

    return debug
180742
def version_list(package):
    
    team, owner, pkg = parse_package(package)
    session = _get_session(team)

    response = session.get(
        "{url}/api/version/{owner}/{pkg}/".format(
            url=get_registry_url(team),
            owner=owner,
            pkg=pkg
        )
    )

    for version in response.json()['versions']:
        print("%s: %s" % (version['version'], version['hash']))
466758
def archs(self, _args):
        """"""
        print('{Style.BRIGHT}Available target architectures are:'
              '{Style.RESET_ALL}'.format(Style=Out_Style))
        for arch in self.ctx.archs:
            print('    {}'.format(arch.arch))
966221
def view(self):
        
        print("")   # new line at start
        description, count = "", 0
        if self.repo == "sbo":
            description = SBoGrep(self.name).description()
        else:
            PACKAGES_TXT = Utils().read_file(self.lib)
            for line in PACKAGES_TXT.splitlines():
                if line.startswith(self.name + ":"):
                    description += line[len(self.name) + 2:] + "\n"
                    count += 1
                    if count == 11:
                        break
        if description:
            print("{0}{1}{2}".format(self.COLOR, description,
                                     self.meta.color["ENDC"]))
        else:
            self.msg.pkg_not_found("", self.name, "No matching", "\n")
            raise SystemExit(1)
        if description and self.repo == "sbo":
            print("")
1217690
def slack_package(prgnam):
    
    binaries, cache, binary = [], "0", ""
    for pkg in find_package(prgnam, _meta_.output):
        if pkg.startswith(prgnam) and pkg[:-4].endswith("_SBo"):
            binaries.append(pkg)
    for bins in binaries:
        if LooseVersion(bins) > LooseVersion(cache):
            binary = bins
            cache = binary
    if not binary:
        Msg().build_FAILED(prgnam)
        raise SystemExit(1)
    return ["".join(_meta_.output + binary)]
974654
def get_build_args():
    """"""
    try:
        build_args = package_config()
    except Exception as e:
        if isinstance(e, OSError):
            if e.errno != errno.ENOENT:
                _LOGGER.warn('Failed to run pkg-config: {}'.format(e))
        else:
            _LOGGER.warn('pkg-config failed to find tesseract/lept libraries: {}'.format(e))
        build_args = get_tesseract_version()

    if build_args['cython_compile_time_env']['TESSERACT_VERSION'] >= 0x3050200:
        _LOGGER.debug('tesseract >= 03.05.02 requires c++11 compiler support')
        build_args['extra_compile_args'] = ['-std=c++11', '-DUSE_STD_NAMESPACE']

    _LOGGER.debug('build parameters: {}'.format(build_args))
    return build_args
802777
def version():
    
    click.echo(
        click.style(
            "F.A.B Version: {0}.".format(current_app.appbuilder.version),
            bg="blue",
            fg="white"
        )
    )
663082
def package_version(self):
        """"""
        vbase = self.base_version
        if self.ncommits:
            vbase += '.dev{0}+{1}'.format(self.ncommits, self.sha)
        return vbase