当前位置: 首页>>代码示例>>Python>>正文


Python setup_command.BuildDoc类代码示例

本文整理汇总了Python中sphinx.setup_command.BuildDoc的典型用法代码示例。如果您正苦于以下问题:Python BuildDoc类的具体用法?Python BuildDoc怎么用?Python BuildDoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BuildDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

 def run(self):
     subprocess.call('sphinx-apidoc -f -o doc/source keystone',
                     shell=True)
     for builder in ['html', 'man']:
         self.builder = builder
         self.finalize_options()
         BuildDoc.run(self)
开发者ID:Cygnet,项目名称:keystone,代码行数:7,代码来源:setup.py

示例2: initialize_options

 def initialize_options(self):
     SphinxBuildDoc.initialize_options(self)
     self.clean_docs = False
     self.no_intersphinx = False
     self.open_docs_in_browser = False
     self.warnings_returncode = False
     self.traceback = False
开发者ID:Cadair,项目名称:astropy-helpers,代码行数:7,代码来源:build_sphinx.py

示例3: run

 def run(self):
     # We need to create some assets in the source tree first...
     from robot.libdoc import libdoc
     out_file = os.path.join(self.source_dir, 'robot-doc.html')
     libdoc('DrupalLibrary::None', out_file)
     # ... before running the regular Sphinx builder
     BuildDoc.run(self)
开发者ID:alterway,项目名称:robotframework-drupallibrary,代码行数:7,代码来源:setup.py

示例4: run

 def run(self):
     base_dir = os.path.dirname(os.path.abspath(__file__))
     subprocess.Popen(["python", "generate_autodoc_index.py"], cwd=os.path.join(base_dir, "doc")).communicate()
     for builder in ["html", "man"]:
         self.builder = builder
         self.finalize_options()
         BuildDoc.run(self)
开发者ID:famao,项目名称:keystone,代码行数:7,代码来源:setup.py

示例5: run

 def run(self):
     ret = subprocess.call(
         [sys.executable, sys.argv[0], 'build_ext', '-i']
     )
     if ret != 0:
         raise RuntimeError("Building Scipy failed!")
     SphinxBuildDoc.run(self)
开发者ID:hihihippp,项目名称:scikit-tensor,代码行数:7,代码来源:setup.py

示例6: run

 def run(self):
     src_dir = (self.distribution.package_dir or {'': ''})['']
     src_dir = os.path.join(os.getcwd(), src_dir)
     sphinx.apidoc.main(
         ['', '-f', '-o', os.path.join(self.source_dir, '_apidoc'),
          src_dir])
     BuildDoc.run(self)
开发者ID:davinirjr,项目名称:django-cache-management,代码行数:7,代码来源:setup.py

示例7: run

    def run(self):
        """ Execute the build_sphinx command.

        The HTML and PDF docs will be included in the tarball. So this script
        MUST be executed before creating the distributable tarball.
        """

        # Build the Users Guide in HTML and TeX format
        for builder in ('html', 'pdf'):
            # Tidy up before every build
            try:
                os.remove(os.path.join(self.source_dir, 'index.rst'))
            except OSError:
                pass
            shutil.rmtree(self.doctree_dir, True)

            self.builder = builder
            self.builder_target_dir = os.path.join(self.build_dir, builder)
            self.mkpath(self.builder_target_dir)
            builder_index = 'index_{0}.txt'.format(builder)
            copy_file(os.path.join(self.source_dir, builder_index), 
                os.path.join(self.source_dir, 'index.rst'))
            BuildDoc.run(self)

        # Copy the docs to their final destination:
        # HTML docs (Users Guide and License) -> ./vitables/htmldocs
        # PDF guide -> ./doc
        output_dir = os.path.join("vitables", "htmldocs")
        if not os.access(output_dir, os.F_OK):
            # Include the HTML guide and the license in the package
            copy_tree(os.path.join(self.build_dir,"html"), output_dir)
            shutil.rmtree(os.path.join(output_dir,"_sources"))
            copy_file('LICENSE.html', output_dir)
        copy_file(os.path.join(self.build_dir, "pdf", 
            "UsersGuide.pdf"), "doc")
开发者ID:OpenTrading,项目名称:ViTables,代码行数:35,代码来源:setupdocs.py

示例8: initialize_options

 def initialize_options(self):
     BuildDoc.initialize_options(self)
     self.update_gh_pages = False
     self.gh_origin_url = "[email protected]:ParaToolsInc/taucmdr.git"
     self.gh_user_name = None # Use github global conf
     self.gh_user_email = None # Use github global conf
     self.gh_commit_msg = "Updated documentation via build_sphinx"
开发者ID:ParaToolsInc,项目名称:taucmdr,代码行数:7,代码来源:setup.py

示例9: run

        def run(self):

            # make sure the python path is pointing to the newly built
            # code so that the documentation is built on this and not a
            # previously installed version

            build = self.get_finalized_command('build')
            sys.path.insert(0, os.path.abspath(build.build_lib))

            # Copy gui files to the path:
            dst = os.path.join(os.path.abspath(build.build_lib), "pyFAI", "gui")
            if not os.path.isdir(dst):
                os.makedirs(dst)
            for i in os.listdir("gui"):
                if i.endswith(".ui"):
                    src = os.path.join("gui", i)
                    idst = os.path.join(dst, i)
                    if not os.path.exists(idst):
                        shutil.copy(src, idst)

            # Build the Users Guide in HTML and TeX format
            for builder in ('html', 'latex'):
                self.builder = builder
                self.builder_target_dir = os.path.join(self.build_dir, builder)
                self.mkpath(self.builder_target_dir)
                BuildDoc.run(self)
            sys.path.pop(0)
开发者ID:lukasHD,项目名称:pyFAI,代码行数:27,代码来源:setup.py

示例10: run

 def run(self):
     # Make sure the python path is pointing to the newly built
     # code so that the documentation is built on this and not a
     # previously installed version.
     build = self.get_finalized_command('build')
     sys.path.insert(0, os.path.abspath(build.build_lib))
     SphinxBuildDoc.run(self)
     sys.path.pop(0)
开发者ID:mosaic-data-model,项目名称:mosaic-python,代码行数:8,代码来源:setup.py

示例11: run

 def run(self):
     output_dir = os.path.join(__location__, "docs/_rst")
     module_dir = os.path.join(__location__, MAIN_PACKAGE)
     cmd_line_template = "sphinx-apidoc -f -o {outputdir} {moduledir}"
     cmd_line = cmd_line_template.format(outputdir=output_dir,
                                         moduledir=module_dir)
     apidoc.main(cmd_line.split(" "))
     BuildDoc.run(self)
开发者ID:takesxi-shimada,项目名称:pyscaffold,代码行数:8,代码来源:setup.py

示例12: run

 def run(self):
     if self.update_gh_pages:
         self._clone_gh_pages()
     self._copy_docs_source()
     self._generate_api_docs()
     BuildDoc.run(self)
     if self.update_gh_pages:
         self._push_gh_pages()
开发者ID:ParaToolsInc,项目名称:taucmdr,代码行数:8,代码来源:setup.py

示例13: run

 def run(self):
     # in place build
     ret = subprocess.call([sys.executable, sys.argv[0], 'build_ext', '-i'])
     if ret != 0:
         raise RuntimeError("Building atoman failed (%d)" % ret)
     
     # build doc
     BuildDoc.run(self)
开发者ID:chrisdjscott,项目名称:Atoman,代码行数:8,代码来源:setup.py

示例14: initialize_options

 def initialize_options(self):
     BuildDoc.initialize_options(self)
     # Fix up defaults for option dicts
     build_doc = self.distribution.get_option_dict("build_sphinx")
     if "source_dir" not in build_doc:
         self.source_dir = "doc/source"
     if "build_dir" not in build_doc:
         self.build_dir = "doc/build"
     self.all_files = False
开发者ID:rbtcollins,项目名称:pbr,代码行数:9,代码来源:cmdclass.py

示例15: run

 def run(self):
     self.run_command('api_docs')
     # We need to be in the doc directory for to plot_directive
     # and API generation to work
     os.chdir('doc')
     try:
         BuildDoc.run(self)
     finally:
         os.chdir('..')
     self.zip_docs()
开发者ID:GaelVaroquaux,项目名称:nipy,代码行数:10,代码来源:setup_helpers.py


注:本文中的sphinx.setup_command.BuildDoc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。