summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2008-09-27 15:55:05 +0000
committerBob Ippolito <bob@redivi.com>2008-09-27 15:55:05 +0000
commit41cb5114519b8ed175bca56af2e9e673f570ad88 (patch)
treec8f1e560c517d7ff94cd38660ccfbcc57d89a9fa /scripts
parent0acf8b44f644756d6b874887b251d810f4f500dd (diff)
downloadsimplejson-41cb5114519b8ed175bca56af2e9e673f570ad88.tar.gz
switch to sphinx for docs
git-svn-id: http://simplejson.googlecode.com/svn/trunk@127 a4795897-2c25-0410-b006-0d3caba88fa1
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make_docs.py25
1 files changed, 7 insertions, 18 deletions
diff --git a/scripts/make_docs.py b/scripts/make_docs.py
index 2c59032..d046c1a 100755
--- a/scripts/make_docs.py
+++ b/scripts/make_docs.py
@@ -3,26 +3,15 @@ import os
import subprocess
import shutil
-PROJECT='simplejson'
+SPHINX_BUILD = 'sphinx-build'
-def _get_version():
- from pkg_resources import PathMetadata, Distribution
- egg_info = PROJECT + '.egg-info'
- base_dir = os.path.dirname(egg_info)
- metadata = PathMetadata(base_dir, egg_info)
- dist_name = os.path.splitext(os.path.basename(egg_info))[0]
- dist = Distribution(base_dir, project_name=dist_name, metadata=metadata)
- return dist.version
-VERSION = _get_version()
-
-PUDGE = '/Library/Frameworks/Python.framework/Versions/2.4/bin/pudge'
-#PUDGE = 'pudge'
+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([
- PUDGE, '-v', '-d', 'docs', '-m', PROJECT,
- '-l', '%s %s' % (PROJECT, VERSION),
- '--theme=green'
+ SPHINX_BUILD, '-d', DOCTREES_DIR, '-b', 'html', '.', 'docs',
])
-if not res:
- shutil.copyfile('docs/module-simplejson.html', 'docs/index.html')
raise SystemExit(res)