summaryrefslogtreecommitdiffstats
path: root/third_party/simplejson/scripts/make_docs.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/simplejson/scripts/make_docs.py')
-rwxr-xr-xthird_party/simplejson/scripts/make_docs.py17
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)