• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python setup_command.BuildDoc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: run

 def run(self):
     build = self.get_finalized_command('build')
     sys.path.insert(0, os.path.abspath(build.build_lib))
     self.builder_target_dir = 'build/doc/{0}/doc'.format(DISTNAME)
     BuildDoc.user_options
     try:
         BuildDoc.run(self)
     except UnicodeDecodeError:
         print >>sys.stderr, "ERROR: unable to build documentation because Sphinx do not handle source path with non-ASCII characters. Please try to move the source package to another location (path with *only* ASCII characters)."
     sys.path.pop(0)
开发者ID:filmor,项目名称:oct2py,代码行数:10,代码来源:setup.py


示例17: run

 def run(self):
     if self.builder == "doctest":
         import sphinx.ext.doctest as doctest
         # Capture the DocTestBuilder class in order to return the total
         # number of failures when exiting
         ref = capture_objs(doctest.DocTestBuilder)
         BuildDoc.run(self)
         errno = ref[-1].total_failures
         sys.exit(errno)
     else:
         BuildDoc.run(self)
开发者ID:LeotisBuchanan,项目名称:MySite,代码行数:11,代码来源:setup.py


示例18: run

            def run(self):
                if not os.getenv('SPHINX_DEBUG'):
                    self.generate_autoindex()

                for builder in ['html', 'man']:
                    self.builder = builder
                    self.finalize_options()
                    self.project = self.distribution.get_name()
                    self.version = self.distribution.get_version()
                    self.release = self.distribution.get_version()
                    BuildDoc.run(self)
开发者ID:bussyjd,项目名称:nova,代码行数:11,代码来源:setup.py


示例19: 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))
            # we need to reload PyMca from the build directory and not
            # the one from the source directory which does not contain
            # the extensions
            BuildDoc.run(self)
            sys.path.pop(0)
开发者ID:amundhov,项目名称:pyFAI,代码行数:12,代码来源:setup.py


示例20: run

        def run(self):

            """ Execute the build_sphinx command.

            The HTML and PDF docs are included in the tarball. So even if 
            sphinx or pdflatex are not installed on the user's system she will 
            get the full documentation installed when installing ViTables in 
            the usual way::

                # python setup.py install

            because the build_sphinx command will not be executed by default.

            If user is installing from a binary package (which will not include
            the docs, I think), in order to ensure that she will always end up with
            the docs being installed, the package should depend on the sphinx and
            pdflatex packages and the `sphinx_found` variable should be set to 
            True.
            """

            # Build the Users Guide in HTML and TeX format
            for builder in ('html', 'latex'):
                # 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)

            # Build the Users Guide in PDF format
            builder_latex_dir = os.path.join(self.build_dir, 'latex')
            make_path = find_executable("make")
            spawn([make_path, "-C", builder_latex_dir, "all-pdf"])

            # 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(builder_latex_dir, 
                "UsersGuide.pdf"), "doc")
开发者ID:xbsd,项目名称:scipy_2014,代码行数:53,代码来源:setup.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python util.assert_node函数代码示例发布时间:2022-05-27
下一篇:
Python en.SearchEnglish类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap