Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs build #1805

Merged
merged 2 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 4 additions & 6 deletions src/docs/show-help-files/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,14 @@ $(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:
$(SPHINX_BUILD) -M clean "$(srcdir)" "$(OUTDIR)" $(SPHINX_OPTS)

###########################################################################

# 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)
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