]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
admin/build-doc: consolidate the build deps into admin/doc-pybind.txt
authorKefu Chai <kchai@redhat.com>
Sat, 12 Dec 2020 07:09:49 +0000 (15:09 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 12 Dec 2020 08:27:20 +0000 (16:27 +0800)
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>
.readthedocs.yml
admin/build-doc
admin/doc-pybind.txt [new file with mode: 0644]
admin/doc-python-common-requirements.txt
admin/doc-read-the-docs.txt

index 24815ce2466e4622cb65a8cb5addedfc90648a60..8f83166d6ce4e49351f03405f854def2f6c6557b 100644 (file)
@@ -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
index a337acba0a7b2f3b0961ac68c4dfd5d4012f77d6..863639c0e424bf9efb72b6d0d1a83ce16d8bc4ac 100755 (executable)
@@ -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 (file)
index 0000000..9ec4acf
--- /dev/null
@@ -0,0 +1,4 @@
+src/pybind/rados
+src/pybind/cephfs
+src/pybind/rbd
+src/pybind/rgw
index 8cd8ec78c99be8706931d44f330c24f3ceed084a..e4768e3e4300d076ee06da65f82f69a9239b9110 100644 (file)
@@ -1,3 +1,3 @@
 pcpp
 Jinja2
--e../src/python-common
+src/python-common
index c66a08d9a8785423f6379bdd683bbf1b15e41eda..b65cc4638491a583db59c7aeb0d5f8c3cfbfbee1 100644 (file)
@@ -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