Пример #1
0
def build(options):
    sh('cp %s/index.rst %s' % (options.build.confdir,options.build.sourcedir))

    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    bi = sh('git describe --long',capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi


    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options, 'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/index.rst" % options.build.confdir)
Пример #2
0
def build(options):
    sh('cp %s/index.rst %s' % (options.build.confdir,options.build.sourcedir))

    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    bi = sh('git describe --long',capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/toc.rst" % options.build.sourcedir)
Пример #3
0
def build(options):
    sh("cp %s/index.rst %s" % (options.build.confdir, options.build.sourcedir))

    if "all" in options.build:
        options["force_all"] = True
        options["freshenv"] = True

    bi = sh("git describe --long", capture=True)[:-1]
    bi = bi.split("-")[0]
    options.build.template_args["build_info"] = bi

    if "outputdir" in options.build:
        options.build.outdir = options.build.outputdir

    if "masterurl" in options.build:
        options.build.template_args["course_url"] = options.build.masterurl

    if "masterapp" in options.build:
        options.build.template_args["appname"] = options.build.masterapp

    print "Building into ", options.build.outdir
    paverutils.run_sphinx(options, "build")

    if updateProgressTables:
        print "Creating Chapter Information"
        populateChapterInfo(project_name, "%s/toc.rst" % options.build.sourcedir)
Пример #4
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    try:
        bi = sh('git describe --long',capture=True)[:-1]
        bnum = bi.split('-')[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = 'unknown'

    with open('build_info','w') as bif:
        bif.write(bi)
        bif.write("\n")

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options,'build')


    try:
        sys.path.insert(0,os.path.join('..','..','modules'))
        if os.path.exists(os.path.join(options.build.sourcedir,'toc.rst')):
            idxfile = os.path.join(options.build.sourcedir,'toc.rst')
        else:
            idxfile = os.path.join(options.build.sourcedir,'index.rst')
        from chapternames import populateChapterInfo
        populateChapterInfo(options.build.project_name, idxfile)
        print('Creating Chapter Information')
    except ImportError as e:
        print('Chapter information database population skipped, This is OK for a standalone build.',e)
    except Exception as e:
        print('Chapter Information Creation Failed with', e)

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name) )
Пример #5
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/index.rst" % options.build.sourcedir)
Пример #6
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    try:
        bi = sh('git describe --long',capture=True)[:-1]
        bi = bi.split('-')[0]
        options.build.template_args["build_info"] = bi
    except:
        options.build.template_args["build_info"] = 'unknown'

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options,'build')


    try:
        from chapternames import populateChapterInfo
        populateChapterInfo(options.build.project_name, "%s/index.rst" % options.build.sourcedir)
        print('Creating Chapter Information')
    except ImportError:
        print('Chapter information database population skipped, This is OK for a standalone build.')

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name) )