Skip to content

Commit

Permalink
docs: use sphinx-argparse-cli
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat authored and FFY00 committed Feb 13, 2021
1 parent fb39558 commit 3b1db2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx_autodoc_typehints',
'sphinxcontrib.autoprogram',
'sphinx_argparse_cli',
]

intersphinx_mapping = {
Expand Down
10 changes: 7 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ A simple, correct :pep:`517` package builder.
build will invoke the :pep:`517` hooks to build a distribution package.
It is a simple build tool and does not perform any dependency management.

.. autoprogram:: build.__main__:main_parser()
:prog: python -m build
.. sphinx_argparse_cli::
:module: build.__main__
:func: main_parser
:prog: python -m build
:title: python -m build
:usage_width: 97

.. note::

A ``pyproject-build`` CLI script is also available, so that tools such as pipx_
can use it.

By default build will build the package in an isolated
environment, but this behavior can be disabled with `--no-isolation`.
environment, but this behavior can be disabled with ``--no-isolation``.

.. toctree::
:hidden:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ console_scripts =
docs =
furo>=2020.11.19b18
sphinx~=3.0
sphinx-argparse-cli>=1.5
sphinx-autodoc-typehints>=1.10
sphinxcontrib-autoprogram>=0.1
test =
filelock>=3
pytest>=4
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ basepython = python3.8
extras =
docs
commands =
sphinx-build -n -W docs {envtmpdir}
sphinx-build -n docs {envtmpdir} {posargs:-W}
python -c 'print("Documentation available under file://{envtmpdir}/index.html")'

[testenv:dev]
Expand Down

0 comments on commit 3b1db2c

Please sign in to comment.