# Path: core/waf/common.py
# def conf(f):
# 	def fun(*k,**kw):
# 		mandatory=True
# 		if'mandatory'in kw:
# 			mandatory=kw['mandatory']
# 			del kw['mandatory']
# 		try:
# 			return f(*k,**kw)
# 		except Errors.ConfigurationError as e:
# 			if mandatory:
# 				raise e
# 	setattr(Options.OptionsContext,f.__name__,fun)
# 	setattr(Configure.ConfigurationContext,f.__name__,fun)
# 	setattr(Build.BuildContext,f.__name__,fun)
# 	return f


import os,shlex,sys,time,json,subprocess,shutil
import time
import re
            import subprocess
        import shutil
            import subprocess
        import shutil
from waflib import Context,Scripting,TaskGen
from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors
from core.waf.common import conf
from core.waf.subcommand import subcommand, SubcommandContext
def loadrepos(self):
    """Load repositories"""
    REPOS = read_repos()
    for d, repo in REPOS.items():
        directory = os.path.join(os.getcwd(),d)
        vals = get_repo_vals(directory)
        waf = os.path.join(directory, "waf")
        for val in vals.get("tools", []):
            try:
                self.load(val, tooldir=[waf])
            except (ImportError, self.errors.ConfigurationError):
                self.load(val, tooldir=None)


conf(loadrepos)

def iterrepos(self):
    """
        Iterate through repositories.
        It is simmilar to recurse.
        But it does not work on subdirectories but repos.
    """
    REPOS = read_repos()
    self.repositories = REPOS
    for d, repo in REPOS.items():
        if d == "core":
            continue
        self.repository_root = self.srcnode.find_node(str(d))
        self.recurse([self.repository_root.abspath()])


# Path: core/waf/common.py
# def conf(f):
# 	def fun(*k,**kw):
# 		mandatory=True
# 		if'mandatory'in kw:
# 			mandatory=kw['mandatory']
# 			del kw['mandatory']
# 		try:
# 			return f(*k,**kw)
# 		except Errors.ConfigurationError as e:
# 			if mandatory:
# 				raise e
# 	setattr(Options.OptionsContext,f.__name__,fun)
# 	setattr(Configure.ConfigurationContext,f.__name__,fun)
# 	setattr(Build.BuildContext,f.__name__,fun)
# 	return f


# Path: core/waf/repository.py
import os,shlex,sys,time,json,subprocess,shutil
import time
import re
            import subprocess
        import shutil
            import subprocess
        import shutil
from waflib import Context,Scripting,TaskGen
from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors
from core.waf.common import conf
from core.waf.subcommand import subcommand, SubcommandContext

def loadrepos(self):
    """Load repositories"""
    REPOS = read_repos()
    for d, repo in REPOS.items():
        directory = os.path.join(os.getcwd(),d)
        vals = get_repo_vals(directory)
        waf = os.path.join(directory, "waf")
        for val in vals.get("tools", []):
            try:
                self.load(val, tooldir=[waf])
            except (ImportError, self.errors.ConfigurationError):
                self.load(val, tooldir=None)


conf(loadrepos)

def iterrepos(self):
    """
        Iterate through repositories.
        It is simmilar to recurse.
        But it does not work on subdirectories but repos.
    """
    REPOS = read_repos()
    self.repositories = REPOS
    for d, repo in REPOS.items():
        if d == "core":
            continue
        self.repository_root = self.srcnode.find_node(str(d))
        self.recurse([self.repository_root.abspath()])


conf(iterrepos)