Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-04-27 22:20:27 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-04-27 22:20:27 (GMT)
commitfcf7ffeca964c31925c0ba275b2b09715070d541 (patch)
treede9a1a52ea31a539a4f05f6eefb2f029f8162fb2 /docs
Milestone 1 import
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile36
-rw-r--r--docs/getbuildpath.py14
-rw-r--r--docs/writedocs.py20
3 files changed, 70 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..5039931
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,36 @@
+######################################################################
+## Different doc packages need different things. Some have to
+## import the source, others just need to parse it. The hacks in
+## this file attempt to make this happen for some of the common doc
+## systems.
+######################################################################
+export PRODUCT_DIR=${CURDIR}/../
+export PYTHONPATH=`./getbuildpath.py`
+
+# If you have epydoc installed feel free
+#DOC_TARGETS += epydoc_pdf
+DOC_TARGETS += pydoc
+
+all: doc
+
+epydoc_html:
+ @epydoc -qq --html -o ${PRODUCT_DIR}/docs ${PYTHONPATH}/${PROJECTNAME}
+
+epydoc_pdf:
+ @epydoc -qq --pdf -o ${PRODUCT_DIR}/docs ${PYTHONPATH}/${PROJECTNAME}
+
+pydoc:
+ @${PYTHON} ./writedocs.py ${PRODUCT_DIR}
+
+
+doc: ${DOC_TARGETS}
+
+clean:
+ @find . -name "*.pyc" -exec rm {} \;
+ @find . -name "*~" -exec rm {} \;
+ @find . -name "${PROJECTNAME}*.html" -exec rm {} \;
+ @rm -rf index.html epydoc.css public private
+ @rm -rf api.* *.aux *.tex
+
+
+
diff --git a/docs/getbuildpath.py b/docs/getbuildpath.py
new file mode 100644
index 0000000..d6e594a
--- /dev/null
+++ b/docs/getbuildpath.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python2.4
+import os, sys
+
+# IF YOU ARE NOT GETTING THE RESULTS YOU EXPECT WHILE TESTING
+# THIS IS THE LIKELY CAUSE
+# :: Use distutils to modify the pythonpath for inplace testing
+from distutils.util import get_platform
+plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3])
+build_platlib = os.path.join("build", 'lib' + plat_specifier)
+test_lib = os.path.join(os.path.abspath(".."), build_platlib)
+sys.path.insert(0, test_lib)
+# END PATH ADJUSTMENT CODE
+print test_lib
+
diff --git a/docs/writedocs.py b/docs/writedocs.py
new file mode 100644
index 0000000..132ef4f
--- /dev/null
+++ b/docs/writedocs.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+import pydoc
+import sys, os
+
+
+# IF YOU ARE NOT GETTING THE RESULTS YOU EXPECT WHILE TESTING
+# THIS IS THE LIKELY CAUSE
+# :: Use distutils to modify the pythonpath for inplace testing
+from distutils.util import get_platform
+plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3])
+build_platlib = os.path.join("build", 'lib' + plat_specifier)
+test_lib = os.path.join(os.path.abspath(".."), build_platlib)
+sys.path.insert(0, test_lib)
+# END PATH ADJUSTMENT CODE
+
+sys.path.insert(0, sys.argv[1])
+
+import olpc.datastore
+
+pydoc.writedocs(olpc.datastore.__path__[0], "%s." % olpc.datastore.__name__)