Skip to content

Commit 4893b24

Browse files
committed
DEV: improve spin docs command
Explain how to build a zipfile of the html docs for release purposes. Remove --install-deps, as that is bad practice and `pip` invocations for dependencies should not be present in this CLI. Closes gh-24713
1 parent 44fe37c commit 4893b24

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

.spin/cmds.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,8 @@ def build(ctx, meson_args, jobs=None, clean=False, verbose=False):
7575
default="auto",
7676
help="Number of parallel build jobs"
7777
)
78-
@click.option(
79-
"--install-deps/--no-install-deps",
80-
default=False,
81-
help="Install dependencies before building"
82-
)
8378
@click.pass_context
84-
def docs(ctx, sphinx_target, clean, first_build, jobs, install_deps):
79+
def docs(ctx, sphinx_target, clean, first_build, jobs):
8580
"""📖 Build Sphinx documentation
8681
8782
By default, SPHINXOPTS="-W", raising errors on warnings.
@@ -97,13 +92,12 @@ def docs(ctx, sphinx_target, clean, first_build, jobs, install_deps):
9792
9893
spin docs TARGET
9994
100-
"""
101-
if sphinx_target not in ('targets', 'help'):
102-
if install_deps:
103-
util.run(['pip', 'install', '-q', '-r', 'doc_requirements.txt'])
95+
E.g., to build a zipfile of the html docs for distribution:
96+
97+
spin docs dist
10498
99+
"""
105100
meson.docs.ignore_unknown_options = True
106-
del ctx.params['install_deps']
107101
ctx.forward(meson.docs)
108102

109103

doc/HOWTO_RELEASE.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,11 @@ github actions.
100100

101101
Building docs
102102
-------------
103-
We are no longer building ``PDF`` files. All that will be needed is
103+
We are no longer building pdf files, only html docs. The ``numpy-html.zip``
104+
needed to upload to the doc server can be built with ``spin docs dist``.
104105

105-
- virtualenv (pip).
106-
107-
The other requirements will be filled automatically during the documentation
108-
build process.
106+
To install the necessary doc build dependencies into your development
107+
environment, run ``pip install -r doc_requirements.txt``.
109108

110109

111110
Uploading to PyPI

0 commit comments

Comments
 (0)