# Path: pybombs/config_manager.py
# def npath(path):
#     def __init__(self, args, cfg_list, select_prefix=None):
#     def _set_attrs(self):
#     def _merge_config_info_from_file(self, cfg_file, cfg_data):
#     def _find_prefix_dir(self, args):
#     def _detect_python_version(self):
#     def _detect_python_path(self):
#     def _load_environ_from_script(self, setup_env_file):
#     def _load_default_env(self, env):
#     def get_prefix_cfg_dir_writable(self):
#     def __init__(self, select_prefix=None):
#     def load(self, select_prefix=None):
#     def _append_cfg_from_file(self, cfg_filename, index=None):
#     def get_pybombs_dir(self, prefix_dir=None):
#     def get(self, key, default=None):
#     def keys(self):
#     def set(self, key, value):
#     def get_help(self, key):
#     def set_config_reference(self, ref):
#     def get_active_prefix(self):
#     def get_recipe_locations(self):
#     def get_named_recipe_dirs(self):
#     def get_named_recipe_sources(self):
#     def get_named_recipe_cfg_file(self, recipe_alias):
#     def get_template_dir(self):
#     def resolve_recipe_uri(self, uri, name, cache_dir):
#     def get_package_flags(self, pkgname, categoryname=None):
#     def get_python_version(self):
#     def get_satisfier_tags(self):
#     def update_cfg_file(self, new_data, cfg_file=None):
#     def setup_parser(self, parser):
# class PrefixInfo(object):
# class ConfigManager(object):
#     LAYER_DEFAULT = 0
#     LAYER_GLOBALS = 1
#     LAYER_HOME = 2
#     LAYER_PREFIX = 3
#     LAYER_CMDLINE_FILE = 4
#     LAYER_CMDLINE_ARGS = 5
#     LAYER_VOLATILE = 6
# 
# Path: pybombs/pb_logging.py
# BOLD = str('\033[1m')
# TRACE = 1
# class ColoredConsoleHandler(logging.StreamHandler):
# class PBLogger(logging.getLoggerClass()):
#     def emit(self, record):
#     def __init__(self, *args, **kwargs):
#     def trace(self, *args, **kwargs):


import os
from pybombs import config_manager
from pybombs import pb_logging
from pybombs.pb_exception import PBException
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyBOMBS; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
"""
Recipe Manager: Handles the available recipes
"""


class RecipeListManager(object):
    """
    Handles lists of recipes.
    This will handle multiple sets of recipes by means of a
    recipe hierarchy.

    Recipe lists get different ranks. From least to most important:
    - Global default recipe list (defined in /etc/pybombs.d/config.dat or something like that)
    - Whatever is defined in ~/.pybombs/config.dat
    - The selected prefixes recipe list (either an actual recipe folder
      in the prefix, or a value set in that prefix' config.dat)
    - The dir set in env variable PYBOMBS_RECIPE_DIR
    - Dir given through command line (-r)
    """
    def __init__(self):
        self.log = pb_logging.logger.getChild("RecipeListManager")

# Path: pybombs/config_manager.py
# def npath(path):
#     def __init__(self, args, cfg_list, select_prefix=None):
#     def _set_attrs(self):
#     def _merge_config_info_from_file(self, cfg_file, cfg_data):
#     def _find_prefix_dir(self, args):
#     def _detect_python_version(self):
#     def _detect_python_path(self):
#     def _load_environ_from_script(self, setup_env_file):
#     def _load_default_env(self, env):
#     def get_prefix_cfg_dir_writable(self):
#     def __init__(self, select_prefix=None):
#     def load(self, select_prefix=None):
#     def _append_cfg_from_file(self, cfg_filename, index=None):
#     def get_pybombs_dir(self, prefix_dir=None):
#     def get(self, key, default=None):
#     def keys(self):
#     def set(self, key, value):
#     def get_help(self, key):
#     def set_config_reference(self, ref):
#     def get_active_prefix(self):
#     def get_recipe_locations(self):
#     def get_named_recipe_dirs(self):
#     def get_named_recipe_sources(self):
#     def get_named_recipe_cfg_file(self, recipe_alias):
#     def get_template_dir(self):
#     def resolve_recipe_uri(self, uri, name, cache_dir):
#     def get_package_flags(self, pkgname, categoryname=None):
#     def get_python_version(self):
#     def get_satisfier_tags(self):
#     def update_cfg_file(self, new_data, cfg_file=None):
#     def setup_parser(self, parser):
# class PrefixInfo(object):
# class ConfigManager(object):
#     LAYER_DEFAULT = 0
#     LAYER_GLOBALS = 1
#     LAYER_HOME = 2
#     LAYER_PREFIX = 3
#     LAYER_CMDLINE_FILE = 4
#     LAYER_CMDLINE_ARGS = 5
#     LAYER_VOLATILE = 6
# 
# Path: pybombs/pb_logging.py
# BOLD = str('\033[1m')
# TRACE = 1
# class ColoredConsoleHandler(logging.StreamHandler):
# class PBLogger(logging.getLoggerClass()):
#     def emit(self, record):
#     def __init__(self, *args, **kwargs):
#     def trace(self, *args, **kwargs):


# Path: pybombs/recipe_manager.py
import os
from pybombs import config_manager
from pybombs import pb_logging
from pybombs.pb_exception import PBException

# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyBOMBS; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
"""
Recipe Manager: Handles the available recipes
"""


class RecipeListManager(object):
    """
    Handles lists of recipes.
    This will handle multiple sets of recipes by means of a
    recipe hierarchy.

    Recipe lists get different ranks. From least to most important:
    - Global default recipe list (defined in /etc/pybombs.d/config.dat or something like that)
    - Whatever is defined in ~/.pybombs/config.dat
    - The selected prefixes recipe list (either an actual recipe folder
      in the prefix, or a value set in that prefix' config.dat)
    - The dir set in env variable PYBOMBS_RECIPE_DIR
    - Dir given through command line (-r)
    """
    def __init__(self):
        self.log = pb_logging.logger.getChild("RecipeListManager")

        self.cfg = config_manager.config_manager