Exemple #1
0
def build(clean=True,  **kwargs):
    from sphinx import main
    os.chdir( docsdir )
    if clean:
        clean_generated()
        clean_build()
    
    #mkdir -p build/html build/doctrees
    
    #import pymel.internal.cmdcache as cmdcache
    #cmdcache.fixCodeExamples()
    opts = ['']
    opts += '-b html -d build/doctrees'.split()
    
    # set some defaults
    if 'graphviz_dot' not in kwargs:
        kwargs['graphviz_dot'] = find_dot()
    
    for key, value in kwargs.iteritems():
        opts.append('-D')
        opts.append( key.strip() + '=' + value.strip() )
    opts.append('-P')
    opts.append(SOURCE)
    opts.append(BUILD)
    main(opts)
def build(clean=True,  **kwargs):
    from sphinx import main
    os.chdir( docsdir )
    if clean:
        clean_generated()
        clean_build()
    
    #mkdir -p build/html build/doctrees
    
    #import pymel.internal.cmdcache as cmdcache
    #cmdcache.fixCodeExamples()
    opts = ['']
    opts += '-b html -d build/doctrees'.split()
    
    # set some defaults
    if 'graphviz_dot' not in kwargs:
        if os.name == 'posix':
            dots = ['/usr/local/bin/dot', '/usr/bin/dot']
        else:
            dots = ['C:\\graphviz\\bin\\dot.exe']
        dot = None
        for d in dots:
            if os.path.exists(d):
                dot = d
                break
        if not dot:
            raise TypeError( 'cannot find graphiz dot executable in the following locations: %s' % ', '.join(dots) )
        kwargs['graphviz_dot'] = dot
    
    for key, value in kwargs.iteritems():
        opts.append('-D')
        opts.append( key.strip() + '=' + value.strip() )
    opts.append(SOURCE)
    opts.append(BUILD)
    main(opts)
Exemple #3
0
def build(**kwargs):
    from sphinx import main
    os.chdir( docsdir )
    #mkdir -p build/html build/doctrees
    
    #import pymel.internal.cmdcache as cmdcache
    #cmdcache.fixCodeExamples()
    opts = ['']
    opts += '-b html -d build/doctrees'.split()
    
    # set some defaults
    if 'graphviz_dot' not in kwargs:
        if os.name == 'posix':
            dot = '/usr/local/bin/dot'
        else:
            dot = 'C:\\graphviz\\bin\\dot.exe'
        if not os.path.exists(dot):
            raise TypeError( 'cannot find graphiz dot executable' )
        kwargs['graphviz_dot'] = dot   
    
    for key, value in kwargs.iteritems():
        opts.append('-D')
        opts.append( key.strip() + '=' + value.strip() )
    opts.append(SOURCE)
    opts.append( BUILD )
    main(opts)
Exemple #4
0
def generate():
    from sphinx.ext.autosummary.generate import main

    clean_build()
    clean_generated()
    os.chdir( os.path.join(docsdir,SOURCE) )

    main( [''] + '--templates ../templates index.rst'.split() )
    main( [''] + '--templates ../templates'.split() + glob.glob('generated/pymel.*.rst') )
def generate():
    from sphinx.ext.autosummary.generate import main

    os.chdir( os.path.join(docsdir) )
    if os.path.exists(BUILD):
        print "removing", os.path.join(docsdir, BUILD)
        shutil.rmtree(BUILD)

    os.chdir( os.path.join(docsdir,SOURCE) )
    if os.path.exists('generated'):
        print "removing", os.path.join(docsdir,SOURCE,'generated')
        shutil.rmtree('generated')

    main( [''] + '--templates ../templates index.rst'.split() )
    main( [''] + '--templates ../templates'.split() + glob.glob('generated/pymel.*.rst') )
def generate():
    from sphinx.ext.autosummary.generate import main

    os.chdir(os.path.join(docsdir))
    if os.path.exists(BUILD):
        print "removing", os.path.join(docsdir, BUILD)
        shutil.rmtree(BUILD)

    os.chdir(os.path.join(docsdir, SOURCE))
    if os.path.exists('generated'):
        print "removing", os.path.join(docsdir, SOURCE, 'generated')
        shutil.rmtree('generated')

    main([''] + '--templates ../templates index.rst'.split())
    main([''] + '--templates ../templates'.split() +
         glob.glob('generated/pymel.*.rst'))
def build(clean=True, **kwargs):
    from sphinx import main
    os.chdir(docsdir)
    if clean:
        clean_generated()
        clean_build()

    #mkdir -p build/html build/doctrees

    #import pymel.internal.cmdcache as cmdcache
    #cmdcache.fixCodeExamples()
    opts = ['']
    opts += '-b html -d build/doctrees'.split()

    # set some defaults
    if 'graphviz_dot' not in kwargs:
        if os.name == 'posix':
            dots = ['/usr/local/bin/dot', '/usr/bin/dot']
        else:
            dots = ['C:\\graphviz\\bin\\dot.exe']
        dot = None
        for d in dots:
            if os.path.exists(d):
                dot = d
                break
        if not dot:
            raise TypeError(
                'cannot find graphiz dot executable in the following locations: %s'
                % ', '.join(dots))
        kwargs['graphviz_dot'] = dot

    for key, value in kwargs.iteritems():
        opts.append('-D')
        opts.append(key.strip() + '=' + value.strip())
    opts.append(SOURCE)
    opts.append(BUILD)
    main(opts)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    Sphinx - Python documentation toolchain
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import sys

if __name__ == '__main__':
    from sphinx.ext.autosummary.generate import main
    sys.exit(main(sys.argv))
Exemple #9
0
if __name__ == '__main__':
    import sys
    from sphinx.ext.autosummary.generate import main

    sys.exit(main())
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    Sphinx - Python documentation toolchain
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :copyright: 2007-2009 by Georg Brandl.
    :license: BSD.
"""

import sys

if __name__ == '__main__':
    from sphinx.ext.autosummary.generate import main
    sys.exit(main(sys.argv))
Exemple #11
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    Sphinx - Python documentation toolchain
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import sys

if __name__ == '__main__':
    from sphinx.ext.autosummary.generate import main
    sys.exit(main(sys.argv[1:]))