Skip to content

Commit

Permalink
admin/build-doc: use python3
Browse files Browse the repository at this point in the history
to address sphinx-doc/sphinx#3620, we need to
use sphinx with its fix at
sphinx-doc/sphinx@e049f86
in other words, we need to use sphinx v2.0.0 and up. but sphinx 2.0
requires python >= 3.5, so we have to use python3 for building the
documents.

in this change:

* doc-requirements.txt: install python3 packages on debian derivatives
* build-doc: install python3.6 packages from EPEL7, and use python3
  venv for using sphinx2
* doc-requirements.txt: bump up all python packages to latest
  stable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Aug 7, 2019
1 parent 4ac4768 commit ace8cb1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions admin/build-doc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if command -v dpkg >/dev/null; then
exit 1
fi
elif command -v yum >/dev/null; then
for package in python-devel python-pip python-virtualenv doxygen ditaa ant libxml2-devel libxslt-devel Cython graphviz; do
for package in python36-devel python36-pip python36-virtualenv doxygen ditaa ant libxml2-devel libxslt-devel python36-Cython graphviz; do
if ! rpm -q --whatprovides $package >/dev/null ; then
missing="${missing:+$missing }$package"
fi
Expand Down Expand Up @@ -57,7 +57,7 @@ cd build-doc
[ -z "$vdir" ] && vdir="$TOPDIR/build-doc/virtualenv"

if [ ! -e $vdir ]; then
virtualenv --system-site-packages $vdir
virtualenv --python=python3 --system-site-packages $vdir
fi
$vdir/bin/pip install --quiet -r $TOPDIR/admin/doc-requirements.txt

Expand Down
9 changes: 3 additions & 6 deletions admin/doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Sphinx == 1.8.3
Sphinx == 2.1.2
git+https://github.com/ceph/sphinx-ditaa.git@py3#egg=sphinx-ditaa
# newer versions of breathe will require Sphinx >= 2.0.0 and are Python3 only
breathe==4.12.0
# 4.2 is not yet release at the time of writing, to address CVE-2017-18342,
# we have to use its beta release.
pyyaml>=4.2b1
breathe == 4.13.1
pyyaml >= 5.1.2
8 changes: 4 additions & 4 deletions doc_deps.deb.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
git
gcc
python-dev
python-pip
python-virtualenv
python3-dev
python3-pip
python3-virtualenv
doxygen
ditaa
libxml2-dev
libxslt1-dev
graphviz
ant
zlib1g-dev
cython
cython3

0 comments on commit ace8cb1

Please sign in to comment.