summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2020-12-12 08:09:49 +0100
committerKefu Chai <kchai@redhat.com>2020-12-12 09:27:20 +0100
commit6fb4aff5adf4eaa2d6bf27eff8e3e39f26204470 (patch)
tree18cbe88490110f8657da9cce25f959c44f3f5fd6
parentMerge pull request #37433 from aclamk/wip-rocksdb-better-options (diff)
downloadceph-6fb4aff5adf4eaa2d6bf27eff8e3e39f26204470.tar.xz
ceph-6fb4aff5adf4eaa2d6bf27eff8e3e39f26204470.zip
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 <kchai@redhat.com>
-rw-r--r--.readthedocs.yml1
-rwxr-xr-xadmin/build-doc19
-rw-r--r--admin/doc-pybind.txt4
-rw-r--r--admin/doc-python-common-requirements.txt2
-rw-r--r--admin/doc-read-the-docs.txt5
5 files changed, 13 insertions, 18 deletions
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 24815ce2466..8f83166d6ce 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 a337acba0a7..863639c0e42 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 00000000000..9ec4acfcf27
--- /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 8cd8ec78c99..e4768e3e430 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 c66a08d9a87..b65cc463849 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