def bind_package(name, path=None, version_range=None, no_deps=False,<EOL>bind_args=None, quiet=False):
pending = set([name])<EOL>installed_variants = []<EOL>installed_package_names = set()<EOL>primary = True<EOL>while pending:<EOL><INDENT>pending_ = pending<EOL>pending = set()<EOL>exc_type = None<EOL>for name_ in pending_:<EOL><INDENT>try:<EOL><INDENT>variants_ = _bind_package(name_,<EOL>path=path,<EOL>version_range=version_range,<EOL>bind_args=bind_args,<EOL>quiet=quiet)<EOL><DEDENT>except exc_type as e:<EOL><INDENT>print_error("<STR_LIT>"<EOL>% (name_, e.__class__.__name__, str(e)))<EOL>continue<EOL><DEDENT>installed_variants.extend(variants_)<EOL>for variant in variants_:<EOL><INDENT>installed_package_names.add(variant.name)<EOL><DEDENT>if not no_deps:<EOL><INDENT>for variant in variants_:<EOL><INDENT>for requirement in variant.requires:<EOL><INDENT>if not requirement.conflict:<EOL><INDENT>pending.add(requirement.name)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>primary = False<EOL>version_range = None<EOL>bind_args = None<EOL>exc_type = RezBindError<EOL><DEDENT><DEDENT>if installed_variants and not quiet:<EOL><INDENT>print("<STR_LIT>")<EOL>print()<EOL>_print_package_list(installed_variants)<EOL><DEDENT>return installed_variants<EOL>
Bind software available on the current system, as a rez package.

    Note:
        `bind_args` is provided when software is bound via the 'rez-bind'
        command line tool. Bind modules can define their own command line
        options, and they will be present in `bind_args` if applicable.

    Args:
        name (str): Package name.
        path (str): Package path to install into; local packages path if None.
        version_range (`VersionRange`): If provided, only bind the software if
            it falls within this version range.
        no_deps (bool): If True, don't bind dependencies.
        bind_args (list of str): Command line options.
        quiet (bool): If True, suppress superfluous output.

    Returns:
        List of `Variant`: The variant(s) that were installed as a result of
        binding this package.