예제 #1
0
파일: conf.py 프로젝트: hikarihirata/DIRAC
os.environ['DIRAC_USE_M2CRYPTO'] = 'Yes'

# AUTO SETUP START
if os.environ.get('READTHEDOCS') == 'True':
  setUpReadTheDocsEnvironment(moduleName='DIRAC')

  # re-create the RST files for the command references
  LOG.info('Building command reference')
  from diracdoctools.cmd.commandReference import run as buildCommandReference
  buildCommandReference(configFile='../docs.conf')

  # singlehtml build needs too much memory, so we need to create less code documentation
  buildType = 'limited' if any('singlehtml' in arg for arg in sys.argv) else 'full'
  LOG.info('Chosing build type: %r', buildType)
  from diracdoctools.cmd.codeReference import run as buildCodeDoc
  buildCodeDoc(configFile='../docs.conf', buildType=buildType)

  # Update dirac.cfg
  LOG.info('Concatenating dirac.cfg')
  from diracdoctools.cmd.concatcfg import run as updateCompleteDiracCFG
  updateCompleteDiracCFG(configFile='../docs.conf')

# AUTO SETUP END

# get the dirac version
try:
  from DIRAC import version
  LOG.info('Found dirac version %r', version)
except ImportError as e:
  LOG.info('Failed to import DIRAC.version: %s', e)
  version = 'integration'
예제 #2
0
파일: conf.py 프로젝트: TaykYoku/DIRAC
if os.environ.get("READTHEDOCS") == "True":
    setUpReadTheDocsEnvironment(moduleName="DIRAC", location="../../src")

    # re-create the RST files for the command references
    LOG.info("Building command reference")
    from diracdoctools.cmd.commandReference import run as buildCommandReference

    buildCommandReference(configFile="../docs.conf")

    # singlehtml build needs too much memory, so we need to create less code documentation
    buildType = "limited" if any("singlehtml" in arg
                                 for arg in sys.argv) else "full"
    LOG.info("Chosing build type: %r", buildType)
    from diracdoctools.cmd.codeReference import run as buildCodeDoc

    buildCodeDoc(configFile="../docs.conf", buildType=buildType)

    # Update dirac.cfg
    LOG.info("Concatenating dirac.cfg")
    from diracdoctools.cmd.concatcfg import run as updateCompleteDiracCFG

    updateCompleteDiracCFG(configFile="../docs.conf")

# AUTO SETUP END

else:
    # If not READTHEDOCS just prepare dirac.cfg for docs
    from diracdoctools.cmd.concatcfg import ConcatCFG

    ConcatCFG(configFile="../docs.conf").prepareDiracCFG()