Skip to content

Commit 03f2398

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. Create a Python virtual environment before running configure and install the Right things for Sphinx to build the man pages. This also means that there will be no Pandoc-generated man pages, so don't bother trying to convert them to HTML. Signed-off-by: Jeff Squyres <[email protected]>
1 parent cd78a5c commit 03f2398

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

jenkins/open-mpi-build-script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ 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, but also add sphinx so that our CI can test the
184+
# Sphinx PR before merging the removal of pandoc/addition of Sphinx.
185+
if test -f docs/requirements.txt; then
186+
virtualenv --python=python3 venv
187+
. ./venv/bin/activate
188+
pip install -r docs/requirements.txt
189+
fi
182190
if `which pandoc > /dev/null 2>&1` ; then
183191
echo "--> Found pandoc. Allowing default manpage behavior"
184192
else

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,15 @@ 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+
sh """
113+
if test ! -f docs/requirements.txt; then
114+
ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}
115+
fi
116+
"""
113117
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"
118+
if (artifacts != "") {
119+
currentBuild.description="${currentBuild.description}<b>Manpages:</b> <A HREF=\"${artifacts}\">${artifacts}</A><BR>\n"
120+
}
115121
}
116122
}
117123
},
@@ -123,6 +129,11 @@ parallel (
123129
sh """aws s3 cp ${build_prefix}/${tarball} ${tarball}
124130
tar xf ${tarball}
125131
cd openmpi-*
132+
if test -f docs/requirements.txt; then
133+
virtualenv --python=python3 venv
134+
. ./venv/bin/activate
135+
pip install -r docs/requirements.txt
136+
fi
126137
./configure
127138
make distcheck"""
128139
}

0 commit comments

Comments
 (0)