Skip to content
Snippets Groups Projects
Commit f384f251 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

builVersion run sphinx.

parent cdd872f9
No related branches found
No related tags found
No related merge requests found
...@@ -15,8 +15,8 @@ static/plugin_ace/ ...@@ -15,8 +15,8 @@ static/plugin_ace/
static/plugin_dbui/dbui-debug.js static/plugin_dbui/dbui-debug.js
static/plugin_dbui/dbui-min.js static/plugin_dbui/dbui-min.js
static/plugin_extjs/ static/plugin_extjs/
static/plugin_dbui/docs/epydoc
static/plugin_dbui/docs/jsduck static/plugin_dbui/docs/jsduck
static/plugin_dbui/docs/sphinx
static/plugin_mathjax/ static/plugin_mathjax/
uploads/ uploads/
web2py.plugin.dbui.*.w2p web2py.plugin.dbui.*.w2p
...@@ -51,8 +51,8 @@ JSDOC = 'static/plugin_dbui/docs/jsduck' ...@@ -51,8 +51,8 @@ JSDOC = 'static/plugin_dbui/docs/jsduck'
JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js' JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js'
JSLIBMIN = 'static/plugin_dbui/dbui-min.js' JSLIBMIN = 'static/plugin_dbui/dbui-min.js'
JSLIBSRC = 'static/plugin_dbui/src' JSLIBSRC = 'static/plugin_dbui/src'
SPHINXDOC = 'static/docs/sphinx' SPHINXDOC = 'static/plugin_dbui/docs/sphinx'
SPHINXSRC = 'docs/api/' SPHINXSRC = 'docs/api'
NOW = datetime.datetime.now() NOW = datetime.datetime.now()
PACK_PLUGIN_URL = 'http://localhost:8000/%s/default/pack_plugin' % APP PACK_PLUGIN_URL = 'http://localhost:8000/%s/default/pack_plugin' % APP
...@@ -248,6 +248,30 @@ def set_version(version): ...@@ -248,6 +248,30 @@ def set_version(version):
os.remove(fn) os.remove(fn)
def sphinx():
"""Generate the Sphinx documentation.
"""
if not os.path.exists(SPHINX):
print '\n\tThe application sphinx is missing !'
print '\tSkip this step.\n'
return
if not os.path.exists(SPHINXSRC):
print '\nNo sphinx source file !'
return
# clean the directory
cmd = ["rm", "-rf", SPHINXDOC]
subprocess.call(cmd)
# generate the HTML version
cmd = [SPHINX, "-b", "html", SPHINXSRC, SPHINXDOC]
subprocess.call(cmd)
print "\nSphinx HTML documentation in", SPHINXDOC, "\n"
def web2py(): def web2py():
"""Produce the binary file for the web2py plugin. """Produce the binary file for the web2py plugin.
...@@ -306,7 +330,12 @@ if __name__ == '__main__': ...@@ -306,7 +330,12 @@ if __name__ == '__main__':
dest="get", dest="get",
help="get the version of the current release and exit.") help="get the version of the current release and exit.")
ops.add_option("-s", "--set_version", ops.add_option("-s", "--sphinx",
action="store_true",
dest="sphinx",
help="generate sphinx documentation.")
ops.add_option("-v", "--set_version",
action="store_true", action="store_true",
dest="set", dest="set",
help="set the version.") help="set the version.")
...@@ -322,6 +351,7 @@ if __name__ == '__main__': ...@@ -322,6 +351,7 @@ if __name__ == '__main__':
git=False, git=False,
jsduck=False, jsduck=False,
set=False, set=False,
sphinx=False,
web2py=False) web2py=False)
(opt, args) = ops.parse_args() (opt, args) = ops.parse_args()
...@@ -346,6 +376,9 @@ if __name__ == '__main__': ...@@ -346,6 +376,9 @@ if __name__ == '__main__':
if opt.compile: if opt.compile:
compile() compile()
if opt.sphinx:
sphinx()
if opt.web2py: if opt.web2py:
jsduck() jsduck()
compile() compile()
...@@ -362,6 +395,7 @@ if __name__ == '__main__': ...@@ -362,6 +395,7 @@ if __name__ == '__main__':
git() git()
jsduck() jsduck()
sphinx()
compile() compile()
web2py() web2py()
......
...@@ -39,7 +39,7 @@ extensions = ['sphinx.ext.autodoc', ...@@ -39,7 +39,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
# autosummary configuration # autosummary configuration
autosummary_generate = True autosummary_generate = False
# intersphinx configuration # intersphinx configuration
intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)} intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment