From ab2a7420c0e88836678e0278fff3f9b522e10509 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 15 Sep 2023 15:34:15 -0400 Subject: [PATCH 1/2] src/docs/show-help-files/Makefile.am: fix syntax Signed-off-by: Jeff Squyres --- src/docs/show-help-files/Makefile.am | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/docs/show-help-files/Makefile.am b/src/docs/show-help-files/Makefile.am index 0a87dbc09f..37be796efd 100644 --- a/src/docs/show-help-files/Makefile.am +++ b/src/docs/show-help-files/Makefile.am @@ -104,8 +104,4 @@ maintainer-clean-local: ########################################################################### -# Install the generated text files -if test -e $(TXT_OUTDIR)/help-schizo-pinfo.txt ; \ -then \ - dist_prtedata_DATA = $(ALL_TXT_BUILT) ;\ -fi; +dist_prtedata_DATA = $(ALL_TXT_BUILT) From 81e636c9d2797acb4e6ed18e0ce306ba44d962ff Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 15 Sep 2023 19:22:40 -0400 Subject: [PATCH 2/2] docs: Fix up several minor bugs that showed up via CI Signed-off-by: Jeff Squyres --- Makefile.prte-rules | 5 +++-- configure.ac | 1 + src/docs/show-help-files/Makefile.am | 4 +++- src/docs/show-help-files/build-dummy-ini-files.py | 12 ++++++++---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile.prte-rules b/Makefile.prte-rules index eb50a1855b..27b38eda3e 100644 --- a/Makefile.prte-rules +++ b/Makefile.prte-rules @@ -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 @@ -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) diff --git a/configure.ac b/configure.ac index f513641428..7a25a4a8a4 100644 --- a/configure.ac +++ b/configure.ac @@ -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"], diff --git a/src/docs/show-help-files/Makefile.am b/src/docs/show-help-files/Makefile.am index 37be796efd..f25f919249 100644 --- a/src/docs/show-help-files/Makefile.am +++ b/src/docs/show-help-files/Makefile.am @@ -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: diff --git a/src/docs/show-help-files/build-dummy-ini-files.py b/src/docs/show-help-files/build-dummy-ini-files.py index d17364cd9a..57781cb57a 100755 --- a/src/docs/show-help-files/build-dummy-ini-files.py +++ b/src/docs/show-help-files/build-dummy-ini-files.py @@ -63,10 +63,13 @@ # 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: @@ -74,5 +77,6 @@ # 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