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


Python BuildDoc.finalize_options方法代码示例

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


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

示例1: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
    def finalize_options(self):
        # Clear out previous sphinx builds, if requested
        if self.clean_docs:
            dirstorm = [os.path.join(self.source_dir, "api")]
            if self.build_dir is None:
                dirstorm.append("docs/_build")
            else:
                dirstorm.append(self.build_dir)

            for d in dirstorm:
                if os.path.isdir(d):
                    log.info("Cleaning directory " + d)
                    shutil.rmtree(d)
                else:
                    log.info("Not cleaning directory " + d + " because " "not present or not a directory")

        SphinxBuildDoc.finalize_options(self)
开发者ID:sargas,项目名称:astropy-helpers,代码行数:19,代码来源:build_sphinx.py

示例2: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
 def finalize_options(self):
     from os.path import isfile    
     from distutils.cmd import DistutilsOptionError
     
     if self.build_dir is not None:
         if isfile(self.build_dir):
             raise DistutilsOptionError('Attempted to build_sphinx into a file '+self.build_dir)
         self.mkpath(self.build_dir)
     return BuildDoc.finalize_options(self)
开发者ID:albertoconti,项目名称:astropysics,代码行数:11,代码来源:setup.py

示例3: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
    def finalize_options(self):
        # Clear out previous sphinx builds, if requested
        if self.clean_docs:
            dirstorm = [os.path.join(self.source_dir, 'api'),
                        os.path.join(self.source_dir, 'generated')]
            if self.build_dir is None:
                dirstorm.append('docs/_build')
            else:
                dirstorm.append(self.build_dir)

            for d in dirstorm:
                if os.path.isdir(d):
                    log.info('Cleaning directory ' + d)
                    shutil.rmtree(d)
                else:
                    log.info('Not cleaning directory ' + d + ' because '
                             'not present or not a directory')

        SphinxBuildDoc.finalize_options(self)
开发者ID:adrn,项目名称:astropy-helpers,代码行数:21,代码来源:build_sphinx.py

示例4: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
        def finalize_options(self):
            from os.path import isdir
            from shutil import rmtree

            # Clear out previous sphinx builds, if requested
            if self.clean_docs:
                dirstorm = ["docs/_generated"]
                if self.build_dir is None:
                    dirstorm.append("docs/_build")
                else:
                    dirstorm.append(self.build_dir)

                for d in dirstorm:
                    if isdir(d):
                        log.info("Cleaning directory " + d)
                        rmtree(d)
                    else:
                        log.info("Not cleaning directory " + d + " because " "not present or not a directory")

            BuildDoc.finalize_options(self)
开发者ID:phn,项目名称:astropy,代码行数:22,代码来源:setup_helpers.py

示例5: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
        def finalize_options(self):
            from os.path import isdir
            from shutil import rmtree

            #Clear out previous sphinx builds, if requested
            if self.clean_docs:
                dirstorm = ['docs/_generated']
                if self.build_dir is None:
                    dirstorm.append('docs/_build')
                else:
                    dirstorm.append(self.build_dir)

                for d in dirstorm:
                    if isdir(d):
                        log.info('Cleaning directory ' + d)
                        rmtree(d)
                    else:
                        log.info('Not cleaning directory ' + d + ' because '
                                 'not present or not a directory')

            SphinxBuildDoc.finalize_options(self)
开发者ID:njmiller,项目名称:astropy,代码行数:23,代码来源:setup_helpers.py

示例6: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
 def finalize_options(self):
     """ Override the default for the documentation build
         directory.
     """
     self.build_dir = os.path.join(*DOC_BUILD_DIR.split(os.sep)[:-1])
     BuildDoc.finalize_options(self)
开发者ID:GaelVaroquaux,项目名称:nipy,代码行数:8,代码来源:setup_helpers.py

示例7: finalize_options

# 需要导入模块: from sphinx.setup_command import BuildDoc [as 别名]
# 或者: from sphinx.setup_command.BuildDoc import finalize_options [as 别名]
 def finalize_options(self):
     BuildDoc.finalize_options(self)
开发者ID:bsugerman,项目名称:drizzlepac,代码行数:4,代码来源:setup.py


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