From: Kefu Chai Date: Sat, 12 Dec 2020 07:09:49 +0000 (+0800) Subject: admin/build-doc: consolidate the build deps into admin/doc-pybind.txt X-Git-Tag: v16.1.0~279^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6fb4aff5adf4eaa2d6bf27eff8e3e39f26204470;p=ceph.git admin/build-doc: consolidate the build deps into admin/doc-pybind.txt since all the python bindings are required for building the doc, extract them into admin/doc-pybind.txt. because the pybind python extensions require Cython python module to build, we have to move them into another requirement file, and install them after Cython is installed. Signed-off-by: Kefu Chai --- diff --git a/.readthedocs.yml b/.readthedocs.yml index 24815ce2466e..8f83166d6ce4 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,6 +11,7 @@ python: install: - requirements: admin/doc-requirements.txt - requirements: admin/doc-read-the-docs.txt + - requirements: admin/doc-pybind.txt sphinx: builder: dirhtml configuration: doc/conf.py diff --git a/admin/build-doc b/admin/build-doc index a337acba0a7b..863639c0e424 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -48,8 +48,6 @@ fi # for availability of commands set -e -cd build-doc - [ -z "$vdir" ] && vdir="$TOPDIR/build-doc/virtualenv" if [ ! -e $vdir ]; then @@ -63,7 +61,11 @@ else PIP_INSTALL="$vdir/bin/pip install" fi $PIP_INSTALL --quiet --upgrade pip setuptools -$PIP_INSTALL --quiet -r $TOPDIR/admin/doc-requirements.txt -r $TOPDIR/admin/doc-python-common-requirements.txt +$PIP_INSTALL --quiet \ + -r $TOPDIR/admin/doc-requirements.txt \ + -r $TOPDIR/admin/doc-python-common-requirements.txt +BUILD_DOC=1 $PIP_INSTALL --quiet \ + -r $TOPDIR/admin/doc-pybind.txt install -d -m0755 \ $TOPDIR/build-doc/output/html \ @@ -79,15 +81,6 @@ export PYTHONPATH=$TOPDIR/src/pybind $vdir/bin/python $TOPDIR/doc/scripts/gen_mon_command_api.py > $TOPDIR/doc/api/mon_command_api.rst - -# FIXME(sileht): I dunno how to pass the include-dirs correctly with pip -# for build_ext step, it should be: -# --global-option=build_ext --global-option="--cython-include-dirs $TOPDIR/src/pybind/rados/" -# but that doesn't work, so copying the file in the rbd module directly, that's ok for docs -for bind in rados rbd cephfs rgw; do - BUILD_DOC=1 $vdir/bin/pip install --upgrade $TOPDIR/src/pybind/${bind} -done - for opt in "$@"; do case $opt in html|man|livehtml) @@ -104,6 +97,8 @@ if [ -z "$sphinx_targets" ]; then sphinx_targets="html man" fi +cd build-doc + for target in $sphinx_targets; do # Build with -W so that warnings are treated as errors and this fails case $target in diff --git a/admin/doc-pybind.txt b/admin/doc-pybind.txt new file mode 100644 index 000000000000..9ec4acfcf278 --- /dev/null +++ b/admin/doc-pybind.txt @@ -0,0 +1,4 @@ +src/pybind/rados +src/pybind/cephfs +src/pybind/rbd +src/pybind/rgw diff --git a/admin/doc-python-common-requirements.txt b/admin/doc-python-common-requirements.txt index 8cd8ec78c99b..e4768e3e4300 100644 --- a/admin/doc-python-common-requirements.txt +++ b/admin/doc-python-common-requirements.txt @@ -1,3 +1,3 @@ pcpp Jinja2 --e../src/python-common +src/python-common diff --git a/admin/doc-read-the-docs.txt b/admin/doc-read-the-docs.txt index c66a08d9a878..b65cc4638491 100644 --- a/admin/doc-read-the-docs.txt +++ b/admin/doc-read-the-docs.txt @@ -1,7 +1,2 @@ plantweb git+https://github.com/readthedocs/readthedocs-sphinx-search@master -Cython -src/pybind/rados -src/pybind/cephfs -src/pybind/rbd -src/pybind/rgw