Skip to content

Commit 08e01ec

Browse files
committed
Allow building Sphinx docs
If docs/requirements.txt exists in the source tree, that means that we have Sphinx documentation, not Pandoc documentation, and we don't need to do the Pandoc-specific things to make HTML man pages. Also add some comments about the pending switch on the v5.0.x branch from Pandoc to Sphinx. When that happens, we can delete Pandoc-specific stuff from these scripts. Signed-off-by: Jeff Squyres <[email protected]>
1 parent cd78a5c commit 08e01ec

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

jenkins/open-mpi-build-script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ fi
179179
# ./configure --help. In prep for 5.0, we added a developer
180180
# requirement for pandoc to build (not required for dist tarballs),
181181
# with an explicit option to disable.
182+
# JMS: The requirement will shortly change from pandoc to Sphinx.
183+
# Keep pandoc for now; when Sphinx is brought to the v5.0.x branch, we
184+
# can delete this whole Pandoc-specific if/else block.
182185
if `which pandoc > /dev/null 2>&1` ; then
183186
echo "--> Found pandoc. Allowing default manpage behavior"
184187
else

jenkins/open-mpi.dist.create-tarball.groovy

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,25 @@ parallel (
109109
node(manpage_builder) {
110110
stage('Build Man Pages') {
111111
checkout_code();
112-
sh "ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}"
112+
// JMS As of 8 Mar 2022, Open MPI master has been converted
113+
// away from Pandoc to Sphinx. The difference in the source
114+
// tree is that master has a Python-style
115+
// docs/requirements.txt file. Meaning: if we see that file,
116+
// then we don't have Pandoc, and there's no extra step needed
117+
// to build HTML man pages.
118+
//
119+
// Once the Sphinx stuff has been brought to v5.0.x, Pandoc
120+
// will be fully gone, and this whole Pandoc-specific
121+
// build-manpages.sh stuff can be deleted.
122+
sh """
123+
if test ! -f docs/requirements.txt; then
124+
ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}
125+
fi
126+
"""
113127
artifacts = sh(returnStdout:true, script:'cat ${WORKSPACE}/manpage-build-artifacts.txt').trim()
114-
currentBuild.description="${currentBuild.description}<b>Manpages:</b> <A HREF=\"${artifacts}\">${artifacts}</A><BR>\n"
128+
if (artifacts != "") {
129+
currentBuild.description="${currentBuild.description}<b>Manpages:</b> <A HREF=\"${artifacts}\">${artifacts}</A><BR>\n"
130+
}
115131
}
116132
}
117133
},

0 commit comments

Comments
 (0)