[py-svn] r57568 - py/build

hpk at codespeak.net hpk at codespeak.net
Thu Aug 21 22:31:37 CEST 2008


Author: hpk
Date: Thu Aug 21 22:31:34 2008
New Revision: 57568

Added:
   py/build/builddocs.py
Log:
committing build-doc script from guido


Added: py/build/builddocs.py
==============================================================================
--- (empty file)
+++ py/build/builddocs.py	Thu Aug 21 22:31:34 2008
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+""" build the 'py' documentation and api docs in a directory 'html'
+
+    this script runs py.test from the nearest found py lib, and creates the
+    documents (provided that those doc tests are ran) and apigen docs along
+    the way
+
+    the directory with documents gets placed in the current working directory,
+    command line arguments get passed to py.test
+"""
+
+import py
+import sys
+import os
+
+pypath = py.__.__path__[0]
+here = py.magic.autopath().dirpath()
+print "pypath", pypath
+path = here.join('html')
+args = sys.argv[1:]
+if not args:
+    args = [str(pypath)]
+
+os.system('DOCPATH="%s" APIGENPATH="%s/apigen" %s/bin/py.test '
+          '--apigen=%s/apigen/apigen.py %s' % (
+           path, path, pypath, pypath, ' '.join(args)))



More information about the pytest-commit mailing list