diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:27:50 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:27:50 +0000 |
commit | bed947625415eb87879a48202a84b8b4bd2f92f1 (patch) | |
tree | 9f80119962a8dbb6d0bb3d4cc09af22b555c3a1e /third_party/simplejson/scripts/make_docs.py | |
parent | 563d8417b7c35cdbf197c0c079af61b874d32dea (diff) | |
download | chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.zip chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.tar.gz chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.tar.bz2 |
Extension docs build script, gyp target and PRESUBMIT.PY check
This addeds a mechanism for extension docs to "render" from the api/extension_api.json api "idl", the docs/static file content and the template/ html templates into the static extension docs.
It retains the property that extension docs loaded in chrome with file:/// scheme will regenerate if dependent data has changed, but otherwise is static.
The build.py script runs test_shell to render the static files.
A extension_docs gyp target is defined with appropriate inputs & outputs that will run the build.py
A PRESUBMIT.PY check will warn on upload and commit if any files have changed that would require a docs rebuild.
Note that the PRESUBMIT.PY checks are not currently being run for git cl upload or git cl dcommit.
Review URL: http://codereview.chromium.org/159607
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/simplejson/scripts/make_docs.py')
-rwxr-xr-x | third_party/simplejson/scripts/make_docs.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/simplejson/scripts/make_docs.py b/third_party/simplejson/scripts/make_docs.py new file mode 100755 index 0000000..d046c1a --- /dev/null +++ b/third_party/simplejson/scripts/make_docs.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +import os +import subprocess +import shutil + +SPHINX_BUILD = 'sphinx-build' + +DOCTREES_DIR = 'build/doctrees' +HTML_DIR = 'docs' +for dirname in DOCTREES_DIR, HTML_DIR: + if not os.path.exists(dirname): + os.makedirs(dirname) + +res = subprocess.call([ + SPHINX_BUILD, '-d', DOCTREES_DIR, '-b', 'html', '.', 'docs', +]) +raise SystemExit(res) |