コード例 #1
0
ファイル: pavement.py プロジェクト: Incubaid/pyrakoon
def epydoc():
    '''Build and move the EpyDoc API documentation'''
    from epydoc import cli

    old_argv = tuple(sys.argv)

    try:
        sys.argv[:] = [
            '',
            '--config',
            'epydocrc',
        ]

        options, names = cli.parse_arguments()
    finally:
        sys.argv[:] = old_argv

    options.target = path('dist') / 'doc' / 'api'
    options.target.rmtree()
    options.target.makedirs()

    options.configfiles = ('epydocrc', )

    options.verbosity = options.verbosity or 1

    cli.main(options, ('pyrakoon', ))
コード例 #2
0
ファイル: setup.py プロジェクト: ezod/adolphus
 def run(self):
     if not doc:
         raise ImportError('Epydoc is not available')
     rmtree('doc', ignore_errors=True)
     os.mkdir('doc')
     sys.argv = ['epydoc', '-v', '--name', NAME, '--url', URL, '-o', 'doc', PACKAGE]
     options, names = doc.parse_arguments()
     doc.main(options, names)
コード例 #3
0
ファイル: pavement.py プロジェクト: clofresh/emergent
def epydoc():
    """ Build Epydoc documentation """
    from epydoc import cli
    options, names = cli.parse_arguments()
    options.target = path("dist") / "docs" / "api"
    options.target.rmtree()
    options.target.makedirs()

    cli.main(options, ['emergent'])
コード例 #4
0
 def run(self):
     if not doc:
         raise ImportError('Epydoc is not available')
     rmtree('doc', ignore_errors=True)
     os.mkdir('doc')
     sys.argv = [
         'epydoc', '-v', '--name', NAME, '--url', URL, '-o', 'doc', PACKAGE
     ]
     options, names = doc.parse_arguments()
     doc.main(options, names)
コード例 #5
0
ファイル: epydocs.py プロジェクト: adamhaney/djangodevtools
    def handle(self, *app_labels, **options):
        if len(app_labels) < 1 and not options['all_applications']:
            raise CommandError("need one or more arguments for appname")

        if options.get('all_applications', False):
            app_labels = settings.INSTALLED_APPS

        opt = Options()
        for v in ('action', 'css','graphs','docformat', 'target', 'debug'):
            setattr(opt, v, options.get(v))
        print opt


        # cli function config file and run the documentation build
        #for app_name, target_dir, app in self.get_apps(*app_labels):
        #    os.chdir(target_dir)
        os.chdir('pasport')
        cli.main(opt, ['models'])
コード例 #6
0
ファイル: pavement.py プロジェクト: DarumasLegs/pyrakoon
def epydoc():
    '''Build and move the EpyDoc API documentation'''
    from epydoc import cli

    old_argv = tuple(sys.argv)

    try:
        sys.argv[:] = ['', '--config', 'epydocrc', ]

        options, names = cli.parse_arguments()
    finally:
        sys.argv[:] = old_argv

    options.target = path('dist') / 'doc' / 'api'
    options.target.rmtree()
    options.target.makedirs()

    options.configfiles = ('epydocrc', )

    options.verbosity = options.verbosity or 1

    cli.main(options, ('pyrakoon', ))
コード例 #7
0
ファイル: pavement.py プロジェクト: rhyolight/nupic.son
def build_docs(options):
    """Builds documentation for the project."""
    # Epydoc smartly makes its own output directory if the output
    # directory doesn't exist, but is not so smart that it will
    # recursively create the parents of the output directory if they
    # don't exist. Since we have the output directory path here we
    # might as well create it rather than parsing out just the parents
    # and leaving the directory itself to epydoc.
    if not os.path.exists(options.docs_output):
        os.makedirs(options.docs_output)

    # NOTE(nathaniel): Epydoc actually imports modules during analysis,
    # Melange's modules in turn import App Engine modules, and App Engine
    # modules complain if the right Django and App Engine settings aren't
    # in place at import time. Consequently, we must mutate the current
    # environment to be that of an App Engine test before we can build
    # Melange's documentation.
    os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
    os.environ['SERVER_SOFTWARE'] = 'build'
    appengine_testbed = testbed.Testbed()
    appengine_testbed.activate()
    appengine_testbed.init_datastore_v3_stub()

    # NOTE(nathaniel): Deriving the options to pass to (epydoc.)cli.main this
    # way is horsehockey, but epydoc doesn't actually expose a proper API.
    stored_actual_argv = sys.argv
    sys.argv = [
        'unused_fake_executuable',
        '--config=%s' % options.docs_config,
        '--output=%s' % options.docs_output,
    ]
    epydoc_options, epydoc_names = cli.parse_arguments()
    sys.argv = stored_actual_argv

    # NOTE(nathaniel): As of 13 January 2014 this call emits two false
    # positive "Bad argument - expected name or tuple" errors. See
    # https://sourceforge.net/p/epydoc/bugs/363/ for progress.
    cli.main(epydoc_options, epydoc_names)
コード例 #8
0
ファイル: pavement.py プロジェクト: rhyolight/nupic.son
def build_docs(options):
  """Builds documentation for the project."""
  # Epydoc smartly makes its own output directory if the output
  # directory doesn't exist, but is not so smart that it will
  # recursively create the parents of the output directory if they
  # don't exist. Since we have the output directory path here we
  # might as well create it rather than parsing out just the parents
  # and leaving the directory itself to epydoc.
  if not os.path.exists(options.docs_output):
    os.makedirs(options.docs_output)

  # NOTE(nathaniel): Epydoc actually imports modules during analysis,
  # Melange's modules in turn import App Engine modules, and App Engine
  # modules complain if the right Django and App Engine settings aren't
  # in place at import time. Consequently, we must mutate the current
  # environment to be that of an App Engine test before we can build
  # Melange's documentation.
  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
  os.environ['SERVER_SOFTWARE'] = 'build'
  appengine_testbed = testbed.Testbed()
  appengine_testbed.activate()
  appengine_testbed.init_datastore_v3_stub()

  # NOTE(nathaniel): Deriving the options to pass to (epydoc.)cli.main this
  # way is horsehockey, but epydoc doesn't actually expose a proper API.
  stored_actual_argv = sys.argv
  sys.argv = [
      'unused_fake_executuable',
      '--config=%s' % options.docs_config,
      '--output=%s' % options.docs_output,
      ]
  epydoc_options, epydoc_names = cli.parse_arguments()
  sys.argv = stored_actual_argv

  # NOTE(nathaniel): As of 13 January 2014 this call emits two false
  # positive "Bad argument - expected name or tuple" errors. See
  # https://sourceforge.net/p/epydoc/bugs/363/ for progress.
  cli.main(epydoc_options, epydoc_names)