Skip to content

Commit 515b7f3

Browse files
committed
Replace sphinx[...]-autoprogram by sphinx-argparse
Why: sphinxcontrib-autoprogram's pip version does not support python 3. There is a more recent version in bitbucket's repository but the installation is tedious for the few features it gives. (See comment SMART-Lab#160 (comment) for more details on the problem) How: sphinxcrontrib-autoprogram was only used to generate automatic documentation of the script smart-dispatch so the replacement was trivial. The output is slightly different, arguments being included in tables for sphinx-argparse while not for sphinxcrontrib-autoprogram. Overall sphinx-argparse seems good enough.
1 parent 151020e commit 515b7f3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/source/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.autoprogram']
33+
extensions = ['sphinx.ext.autodoc', 'sphinxarg.ext']
3434

3535
# Add any paths that contain templates here, relative to this directory.
3636
templates_path = ['_templates']
@@ -151,6 +151,3 @@
151151
author, 'SmartDispatch', 'One line description of project.',
152152
'Miscellaneous'),
153153
]
154-
155-
156-

docs/source/usage.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
Usage
33
=====
44

5-
.. autoprogram:: scripts/smart-dispatch:get_parser()
5+
.. argparse::
6+
:filename: ../scripts/smart-dispatch
7+
:func: get_parser
68
:prog: smart-dispatch
79

810

0 commit comments

Comments
 (0)