[pypy-svn] pypy documentation-cleanup: also generate the cmdline overview
cfbolz
commits-noreply at bitbucket.org
Wed Apr 27 15:17:31 CEST 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: documentation-cleanup
Changeset: r43679:4a884b3994cc
Date: 2011-04-27 14:41 +0200
http://bitbucket.org/pypy/pypy/changeset/4a884b3994cc/
Log: also generate the cmdline overview
diff --git a/pypy/doc/config/commandline.rst b/pypy/doc/config/commandline.rst
deleted file mode 100644
--- a/pypy/doc/config/commandline.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-
-.. contents::
-
-
-.. _objspace:
-.. _`overview-of-command-line-options-for-objspace`:
-
--------------------------------
-PyPy Python interpreter options
--------------------------------
-
-The following options can be used after ``translate.py
-targetpypystandalone`` or as options to ``py.py``.
-
-.. GENERATE: objspace
-
-
-.. _translation:
-.. _`overview-of-command-line-options-for-translation`:
-
----------------------------
-General translation options
----------------------------
-
-The following are options of ``translate.py``. They must be
-given before the ``targetxxx`` on the command line.
-
-* `--opt -O:`__ set the optimization level `[0, 1, size, mem, 2, 3]`
-
-.. __: opt.html
-
-.. GENERATE: translation
-
diff --git a/pypy/doc/config/commandline.rst b/pypy/doc/config/commandline.txt
copy from pypy/doc/config/commandline.rst
copy to pypy/doc/config/commandline.txt
diff --git a/pypy/doc/config/generate.py b/pypy/doc/config/generate.py
--- a/pypy/doc/config/generate.py
+++ b/pypy/doc/config/generate.py
@@ -8,6 +8,18 @@
]
start_to_descr = dict([(descr._name, descr) for descr in all_optiondescrs])
+def make_cmdline_overview():
+ result = []
+ txtpath = thisdir.join("commandline.txt")
+ for line in txtpath.read().splitlines():
+ if line.startswith('.. GENERATE:'):
+ start = line[len('.. GENERATE:'):].strip()
+ descr = start_to_descr[start]
+ line = makerestdoc.make_cmdline_overview(descr, title=False).text()
+ result.append(line)
+ rstpath = txtpath.new(ext=".rst")
+ rstpath.write("\n".join(result))
+
def make_rst(basename):
txtpath = thisdir.join(basename)
txtpath.ensure()
@@ -46,3 +58,5 @@
for p in c.getpaths(include_groups=True):
basename = prefix + "." + p + ".txt"
make_rst(basename)
+
+make_cmdline_overview()
diff --git a/pypy/doc/_ref.txt b/pypy/doc/_ref.txt
--- a/pypy/doc/_ref.txt
+++ b/pypy/doc/_ref.txt
@@ -1,6 +1,7 @@
.. _`demo/`: https://bitbucket.org/pypy/pypy/src/default/demo/
.. _`demo/pickle_coroutine.py`: https://bitbucket.org/pypy/pypy/src/default/demo/pickle_coroutine.py
.. _`lib-python/`: https://bitbucket.org/pypy/pypy/src/default/lib-python/
+.. _`lib-python/2.7.0/dis.py`: https://bitbucket.org/pypy/pypy/src/default/lib-python/2.7.0/dis.py
.. _`lib_pypy/`: https://bitbucket.org/pypy/pypy/src/default/lib_pypy/
.. _`lib_pypy/pypy_test/`: https://bitbucket.org/pypy/pypy/src/default/lib_pypy/pypy_test/
.. _`lib_pypy/stackless.py`: https://bitbucket.org/pypy/pypy/src/default/lib_pypy/stackless.py
More information about the Pypy-commit
mailing list