Skip to content

Commit c97f4f0

Browse files
authored
Merge pull request open-mpi#12120 from jsquyres/pr/update-to-match-new-prte-docs
docs: update to match PRRTE v3.0.3 docs
2 parents d872305 + d931a78 commit c97f4f0

File tree

4 files changed

+33
-23
lines changed

4 files changed

+33
-23
lines changed

.readthedocs-pre-create-environment.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,9 @@ PRRTE_RST_SRC_DIR=3rd-party/prrte/src/docs/prrte-rst-content
2020
PRRTE_RST_TARGET_DIR=docs/prrte-rst-content
2121

2222
# Copy the OMPI schizo file from PRRTE
23+
#
24+
# See lengthy comment in docs/Makefile.am about copying in RST files
25+
# from PRRTE for a longer explanation of what is happening here.
2326

2427
cp -rp $SCHIZO_SRC_DIR $SCHIZO_TARGET_DIR
25-
26-
# Only copy the PRRTE RST source files in prrte-rst-content that are
27-
# referenced by ".. include::" in the schizo-ompi-cli.rst file. We do
28-
# this because Sphinx complains if there are .rst files that are not
29-
# referenced. :-(
30-
31-
mkdir -p $PRRTE_RST_TARGET_DIR
32-
files=`fgrep '.. include::' $SCHIZO_TARGET_DIR/schizo-ompi-cli.rstxt | awk '{ print $3 }'`
33-
for file in $files; do
34-
filename=`basename $file`
35-
cp -pf $PRRTE_RST_SRC_DIR/$filename $PRRTE_RST_TARGET_DIR
36-
done
28+
cp -rp $PRRTE_RST_SRC_DIR $PRRTE_RST_TARGET_DIR

3rd-party/prrte

Submodule prrte updated 120 files

docs/Makefile.am

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,11 +1008,6 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
10081008
# changed. We're going to overwrite any local changes in the build
10091009
# tree, but you shouldn't be editing the build tree, anyway. So --
10101010
# good enough.
1011-
#
1012-
# Finally, one added wrinkle: only copy the RST source files in
1013-
# prrte-rst-content that are referenced by ".. include::" in the
1014-
# schizo-ompi-cli.rstxt file. We do this because Sphinx complains if
1015-
# there are .rst files that are not referenced. :-(
10161011
$(ALL_MAN_BUILT):
10171012
$(OMPI_V_SPHINX_COPYRST) if test "$(srcdir)" != "$(builddir)"; then \
10181013
len=`echo "$(srcdir)/" | wc -c`; \
@@ -1027,10 +1022,9 @@ $(ALL_MAN_BUILT):
10271022
cp -p "$$file" "$$dir"; \
10281023
done; \
10291024
fi; \
1030-
for file in `fgrep '.. include::' $(builddir)/schizo-ompi-rst-content/schizo-ompi-cli.rstxt | awk '{ print $$3 }'`; do \
1031-
filename=`basename $$file`; \
1032-
cp -pf $(OMPI_PRRTE_RST_CONTENT_DIR)/$$filename "$(builddir)/prrte-rst-content"; \
1033-
done
1025+
cp -rpf "$(OMPI_PRRTE_RST_CONTENT_DIR)" "$(builddir)"; \
1026+
copied_dir=`basename $(OMPI_PRRTE_RST_CONTENT_DIR)`; \
1027+
chmod -R u+w "$(builddir)/$$copied_dir"
10341028
$(OMPI_V_SPHINX_HTML) OMPI_TOP_SRCDIR=$(top_srcdir) $(SPHINX_BUILD) -M html "$(builddir)" "$(OUTDIR)" $(SPHINX_OPTS)
10351029
$(OMPI_V_SPHINX_MAN) OMPI_TOP_SRCDIR=$(top_srcdir) $(SPHINX_BUILD) -M man "$(builddir)" "$(OUTDIR)" $(SPHINX_OPTS)
10361030

docs/conf.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,31 @@ def get_tarball_version(path, expr):
176176
# List of patterns, relative to source directory, that match files and
177177
# directories to ignore when looking for source files.
178178
# This pattern also affects html_static_path and html_extra_path.
179-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv', 'py*/**']
179+
#
180+
# Note that we exclude the entire prrte-rst-content/ directory.
181+
# Here's why:
182+
#
183+
# * By default, Sphinx will warn about any .rst file that it finds in
184+
# the doc tree that is not referenced via either the "include"
185+
# directive or via a TOC.
186+
# * The prrte-rst-content/ directory contains files that we *do* use
187+
# here in the OMPI docs, but it also contains files that we do
188+
# *not* use here in the OMPI docs.
189+
# * Consequently, we explicitly ".. include:: <filename>" the specific
190+
# files that we want from the prrte-rst-content/ directory. And we
191+
# specifically do *not* include at least some files in the
192+
# prrte-rst-content directory.
193+
# * Listing files/patterns in exclude_patterns:
194+
# * Will prevent Sphinx from searching for/finding new .rst files
195+
# that match those patterns.
196+
# * Will not prevent explicitly ".. include:"'ing a file with a name
197+
# that matches a pattern in exclude_patterns.
198+
#
199+
# Hence, listing prrte-rst-content in exclude_patterns means that
200+
# Sphinx won't complain about the .rst files in that tree that we are
201+
# not referencing from here in the OMPI docs.
202+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv', 'py*/**',
203+
'prrte-rst-content' ]
180204

181205

182206
# Clarify the language for verbatim blocks (::)

0 commit comments

Comments
 (0)