def main(): try: from giza.config.helper import fetch_config from giza.config.runtime import RuntimeStateConfig conf = fetch_config(RuntimeStateConfig()) except: conf = get_conf() m = generate_meta(conf) m.write(sys.argv[1]) print('[meta-build]: built "' + sys.argv[1] + '" to seed build metadata.')
def build(*targets): conf = get_conf() sconf = BuildConfiguration(filename='sphinx.yaml', directory=os.path.join(conf.paths.projectroot, conf.paths.builddata)) target_overrides = [] std_sconf = None for target in targets: if target not in sconf: abort('[sphinx] [ERROR]: {0} is not a supported builder'.format(target)) if 'config' in sconf[target]: target_overrides.append(target) sconf[target].target = sconf[target].config.builder sconf[target].source = os.path.join(conf.paths.projectroot, sconf[target].config.source) sconf[target].root = os.path.join(conf.paths.projectroot, conf.paths.output, sconf[target].config.tag) sconf[target].build_source = os.path.join(sconf[target].root, conf.paths.source) else: sconf[target].target = target sconf[target].source = os.path.join(conf.paths.projectroot, conf.paths.source) sconf[target].root = os.path.join(conf.paths.projectroot, conf.paths.output) sconf[target].build_source = os.path.join(sconf[target].root, 'source') if std_sconf is None: std_sconf = sconf[target] if len(target_overrides) > 0: for tg in target_overrides: prereq(sconf[tg], conf) if std_sconf is not None: prereq(std_sconf, conf) if len(targets) <= 1: sphinx_build_worker(targets[0], conf, sconf) else: jobs = [{ 'job': sphinx_build_worker, 'args': [t, conf, sconf] } for t in targets ] runner(jobs, retval=None)
def _job_transfer(migration, block): conf = get_conf() if 'branch' not in migration or migration['branch'] == conf.git.branches.current: m.job('mkdir -p {0}'.format(migration['target'])) m.job('rsync -a {0}/ {1}/'.format(migration['dependency'], migration['target'])) if 'filter' in migration and migration['filter'] and migration['filter'] is not None: fsobjs = [ ] for obj in migration['filter']: fsobjs.append(migration['target'] + obj) m.job('rm -rf {0}'.format(' '.join(fsobjs))) m.job('touch {0}'.format(migration['target']), block=block) m.msg('[build]: migrated "{0}" to "{1}"'.format(migration['dependency'], migration['target'])) else: m.msg('[build]: doing nothing for {0} in this branch'.format(migration['target']))
project_root = os.path.abspath(os.getcwd()) sys.path.append(project_root) from bootstrap import buildsystem sys.path.append(os.path.join(project_root, buildsystem, 'sphinxext')) sys.path.append(os.path.join(project_root, buildsystem, 'bin')) from utils.config import get_conf from utils.project import get_versions, get_manual_path from utils.serialization import ingest_yaml, ingest_yaml_list from utils.structures import BuildConfiguration from utils.strings import dot_concat conf = get_conf() conf.paths.projectroot = project_root intersphinx_libs = ingest_yaml_list(os.path.join(conf.paths.builddata, 'intersphinx.yaml')) sconf = BuildConfiguration(os.path.join(conf.paths.builddata, 'sphinx-local.yaml')) # -- General configuration ---------------------------------------------------- needs_sphinx = '1.0' extensions = [ 'sphinx.ext.extlinks', 'sphinx.ext.todo', 'mongodb', 'directives', 'intermanual',
project_root = os.path.abspath(os.getcwd()) sys.path.append(project_root) from bootstrap import buildsystem sys.path.append(os.path.join(project_root, buildsystem, "sphinxext")) sys.path.append(os.path.join(project_root, buildsystem, "bin")) from utils.config import get_conf from utils.project import get_versions, get_manual_path from utils.serialization import ingest_yaml, ingest_yaml_list from utils.structures import BuildConfiguration from utils.strings import dot_concat conf = get_conf() conf.paths.projectroot = project_root intersphinx_libs = ingest_yaml_list(os.path.join(conf.paths.builddata, "intersphinx.yaml")) sconf = BuildConfiguration(os.path.join(conf.paths.builddata, "sphinx-local.yaml")) # -- General configuration ---------------------------------------------------- needs_sphinx = "1.0" extensions = ["sphinx.ext.intersphinx", "sphinx.ext.extlinks", "sphinx.ext.todo", "mongodb", "directives"] locale_dirs = [conf.paths.locale] gettext_compact = False templates_path = [".templates"]
import sys import os import datetime project_root = os.path.join(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_root) from bootstrap import buildsystem, master_conf sys.path.append(os.path.join(project_root, buildsystem)) sys.path.append(os.path.join(project_root, "sphinxext")) from utils.config import get_conf conf = get_conf(os.path.dirname(master_conf)) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) needs_sphinx = '1.0' extensions = ["intermanual", "sphinx.ext.extlinks", "hieroglyph", "mongodb"] templates_path = [''] source_suffix = '.txt' master_doc = 'index' project = u'MongoDB Tuning Overview' copyright = u'{0}, MongoDB Inc.'.format(datetime.datetime.today().year) version = '1.0' release = version
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'bin'))) from utils.output import build_platform_notification from utils.serialization import ingest_yaml from utils.config import get_conf, get_conf_file, get_sphinx_builders, render_sphinx_config from makecloth import MakefileCloth # to add a symlink build process, add a tuple to the ``links`` in the builder definitions file. m = MakefileCloth() try: site_conf = get_conf() except AttributeError: from giza.config.helper import fetch_config from giza.config.runtime import RuntimeStateConfig site_conf = fetch_config(RuntimeStateConfig()) def make_all_sphinx(config): b = 'prereq' m.section_break('sphinx prerequisites') m.newline() m.comment('content generators') m.target('api') m.job('fab log.set:debug generate.api')
import sys import os.path from copy import copy sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'bin'))) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from utils.files import expand_tree from utils.git import get_branch from utils.serialization import ingest_yaml from utils.config import get_conf, get_conf_file from makecloth import MakefileCloth m = MakefileCloth() paths = get_conf().paths def generate_integration_targets(conf): m.target('_publish') m.job('fab sphinx.target:{0}'.format(','.join(conf['targets']))) dependencies = [ '_publish'] if 'doc-root' in conf: for dep in conf['doc-root']: dependencies.append(os.path.join(paths['public'], dep)) dependencies.extend(proccess_branch_root(conf)) m.target('publish', dependencies) m.msg('[build]: deployed branch {0} successfully to {1}'.format(get_branch(), paths['public']))
# # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os project_root = os.path.join(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_root) from bootstrap import buildsystem, master_conf sys.path.append(os.path.join(project_root, buildsystem)) from utils.config import get_conf conf = get_conf(project_root) sys.path.insert(0, os.path.abspath(os.path.join('..', 'buildcloth/'))) sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- needs_sphinx = '1.0' extensions = [ "sphinx.ext.intersphinx", "sphinx.ext.extlinks", "sphinx.ext.autodoc" ] templates_path = ['.templates'] source_suffix = '.txt' master_doc = 'index' # General information about the project.
# # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os project_root = os.path.join(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_root) from bootstrap import buildsystem, master_conf sys.path.append(os.path.join(project_root, buildsystem)) from utils.config import get_conf conf = get_conf(project_root) sys.path.insert(0, os.path.abspath(os.path.join('..', 'buildcloth/'))) sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- needs_sphinx = '1.0' extensions = ["sphinx.ext.intersphinx", "sphinx.ext.extlinks", "sphinx.ext.autodoc"] templates_path = ['.templates'] source_suffix = '.txt' master_doc = 'index' # General information about the project. project = u'Buildcloth, a Build-system Generator' copyright = u'2012-2013, Contributors'
def main(): conf = get_conf() m = generate_meta(conf) m.write(sys.argv[1]) print('[meta-build]: built "' + sys.argv[1] + '" to seed build metadata.')
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'bin'))) from utils.output import build_platform_notification from utils.serialization import ingest_yaml from utils.config import get_conf, get_conf_file, get_sphinx_builders, render_sphinx_config from makecloth import MakefileCloth # to add a symlink build process, add a tuple to the ``links`` in the builder definitions file. m = MakefileCloth() try: site_conf = get_conf() except: from giza.config.helper import fetch_config from giza.config.runtime import RuntimeStateConfig site_conf = fetch_config(RuntimeStateConfig()) def make_all_sphinx(config): b = 'prereq' m.section_break('sphinx prerequisites') m.newline() m.comment('content generators') m.target('api') m.job('fab log.set:debug generate.api')