build_sphinx.py 688 Bytes
Newer Older
1 2 3 4 5 6
'''
Created on 10 mars 2015

@author: coissac
'''

7 8 9 10 11 12
try:
    from sphinx.setup_command import BuildDoc as ori_build_sphinx  # @UnresolvedImport
        
    class build_sphinx(ori_build_sphinx):
        '''Build Sphinx documentation in html, epub and man formats 
        '''
13
    
14 15 16 17 18 19 20 21 22 23 24 25 26 27
        description = __doc__
    
        def run(self):
            self.builder='html'
            self.finalize_options()
            ori_build_sphinx.run(self)
            self.builder='epub'
            self.finalize_options()
            ori_build_sphinx.run(self)
            self.builder='man'
            self.finalize_options()
            ori_build_sphinx.run(self)
except ImportError:
    pass