Skip to content

Commit

Permalink
docs: Fix up several minor bugs that showed up via CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Squyres <[email protected]>
  • Loading branch information
jsquyres authored and rhc54 committed Sep 16, 2023
1 parent 4db1f5c commit 3e9ac6c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile.prte-rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) 2008-2022 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2020 Intel, Inc. All rights reserved.
# Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -22,8 +23,8 @@ PRTE_V_SPHINX_MAN = $(prte__v_SPHINX_MAN_$V)
prte__v_SPHINX_MAN_ = $(prte__v_SPHINX_MAN_$AM_DEFAULT_VERBOSITY)
prte__v_SPHINX_MAN_0 = @echo " GENERATE man pages";

PRTE_V_TXT = $(prte__v_SPHINX_TXT_$V)
prte__v_TXT_ = $(prte__v_SPHINX_TXT_$AM_DEFAULT_VERBOSITY)
PRTE_V_TXT = $(prte__v_TXT_$V)
prte__v_TXT_ = $(prte__v_TXT_$AM_DEFAULT_VERBOSITY)
prte__v_TXT_0 = @echo " GENERATE text files";

PRTE_V_LN_S = $(prte__v_LN_S_$V)
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ AC_INCLUDES_DEFAULT
#

OAC_SETUP_SPHINX([$srcdir/docs/_build/html/index.html], [])
AC_CHECK_PROGS(PYTHON, [python3 python python2])

AS_IF([test -n "$OAC_MAKEDIST_DISABLE"],
[AS_IF([test -n "$PRTE_MAKEDIST_DISABLE"],
Expand Down
4 changes: 3 additions & 1 deletion src/docs/show-help-files/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ $(TXT_SENTINEL_OUTPUT):
if PRTE_BUILD_DOCS
$(PRTE_V_TXT) $(SPHINX_BUILD) -M text "$(srcdir)" "$(OUTDIR)" $(SPHINX_OPTS)
else !PRTE_BUILD_DOCS
$(PRTE_V_TXT) $(srcdir)/build-dummy-ini-files.py $(TXT_OUTDIR) $(ALL_TXT_BUILT)
$(PRTE_V_TXT) \
$(PYTHON) $(srcdir)/build-dummy-ini-files.py $(TXT_OUTDIR) $(ALL_TXT_BUILT); \
touch $(TXT_SENTINEL_OUTPUT)
endif !PRTE_BUILD_DOCS

maintainer-clean-local:
Expand Down
12 changes: 8 additions & 4 deletions src/docs/show-help-files/build-dummy-ini-files.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@

# Ensure the out directory exists
full_outdir = os.path.abspath(os.path.dirname(outfile))
# Use older form of os.mkdirs (without the exist_ok param) to make
# this script runnable in as many environments as possible.
if not os.path.exists(full_outdir):
# Use older form of os.mkdirs (without the exist_ok param) to
# make this script runnable in as many environments as
# possible.
os.makedirs(full_outdir)

try:
os.makedirs(full_outdir, exists_ok=True)
# Write the output file
with open(outfile, 'w') as fp:
for section in sections:
# Use Python 2-friendly formatting for environments where
# we don't have Python 3 (!).
fp.write("""[{}]
This help section is empty because PRRTE was built without Sphinx.\n""".format(section))
except Exception:
except Exception as e:
print("ERROR: {}".format(e))
pass

0 comments on commit 3e9ac6c

Please sign in to comment.