def load():
cfg = Bunch(DEFAULTS)<EOL>cfg.project_root = get_project_root()<EOL>if not cfg.project_root:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>cfg.rootjoin = lambda *names: os.path.join(cfg.project_root, *names)<EOL>cfg.srcjoin = lambda *names: cfg.rootjoin(cfg.srcdir, *names)<EOL>cfg.testjoin = lambda *names: cfg.rootjoin(cfg.testdir, *names)<EOL>cfg.cwd = os.getcwd()<EOL>os.chdir(cfg.project_root)<EOL>if cfg.project_root not in sys.path:<EOL><INDENT>sys.path.append(cfg.project_root)<EOL><DEDENT>try:<EOL><INDENT>from setup import project <EOL><DEDENT>except ImportError:<EOL><INDENT>from setup import setup_args as project <EOL><DEDENT>cfg.project = Bunch(project)<EOL>return cfg<EOL>
Load and return configuration as a ``Bunch``.

        Values are based on ``DEFAULTS``, and metadata from ``setup.py``.