def _site(name, help_part): _path = join("sites", name) # TODO: turn part of from_module into .clone(), heh. self = sys.modules[__name__] coll = Collection.from_module( self, name=name, config={"sphinx": { "source": _path, "target": join(_path, "_build") }}, ) coll.__doc__ = "Tasks for building {}".format(help_part) coll["build"].__doc__ = "Build {}".format(help_part) return coll
def _load(self, name): mod, _ = self.loader.load(name) return Collection.from_module(mod)