From 67f95c8f6630a238b74ac4993fd1f448f4dabffd Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 17 Feb 2016 10:13:31 +0100 Subject: [PATCH] Update the documentation Signed-off-by: Mehdi Abaakouk --- admin/build-doc | 21 ++++++++++++++++++++- doc/rados/api/librados-intro.rst | 2 +- doc/rados/api/python.rst | 7 +++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/admin/build-doc b/admin/build-doc index 37cb8c90767c..fe7cf97988d4 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -69,16 +69,35 @@ install -d -m0755 \ mkdir -p $vdir/lib export LD_LIBRARY_PATH="$vdir/lib" export PYTHONPATH=$TOPDIR/src/pybind + +ln -sf librados.so.2 $vdir/lib/librados.so +gcc -shared -o $vdir/lib/librados.so.2 -xc /dev/null +CFLAGS="-iquote $TOPDIR/src/include" \ + CPPFLAGS="-iquote $TOPDIR/src/include" \ + LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \ + $vdir/bin/pip install $TOPDIR/src/pybind/rados +nm $vdir/lib/python*/*-packages/rados.so | grep 'U rados_' | \ + awk '{ print "void "$2"(void) {}" }' | \ + gcc -shared -o $vdir/lib/librados.so.2 -xc - + +# 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 +cp -f $TOPDIR/src/pybind/rados/rados.pxd $TOPDIR/src/pybind/rbd/ + ln -sf librbd.so.1 $vdir/lib/librbd.so gcc -shared -o $vdir/lib/librbd.so.1 -xc /dev/null CFLAGS="-iquote $TOPDIR/src/include" \ CPPFLAGS="-iquote $TOPDIR/src/include" \ LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \ - $vdir/bin/pip install $TOPDIR/src/pybind + $vdir/bin/pip install $TOPDIR/src/pybind/rbd nm $vdir/lib/python*/*-packages/rbd.so | grep 'U rbd_' | \ awk '{ print "void "$2"(void) {}" }' | \ gcc -shared -o $vdir/lib/librbd.so.1 -xc - +rm -f $TOPDIR/src/pybind/rbd/rados.pxd + $vdir/bin/sphinx-build -a -n -b dirhtml -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/html $vdir/bin/sphinx-build -a -b man -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/man diff --git a/doc/rados/api/librados-intro.rst b/doc/rados/api/librados-intro.rst index e43e665d8e4b..654968b6ca3e 100644 --- a/doc/rados/api/librados-intro.rst +++ b/doc/rados/api/librados-intro.rst @@ -61,7 +61,7 @@ headers for C/C++ under ``/usr/include/rados``. :: Getting librados for Python --------------------------- -The ``rados.py`` modules provides ``librados`` support to Python +The ``rados`` modules provides ``librados`` support to Python applications. The ``librados-dev`` package for Debian/Ubuntu and the ``librados2-devel`` package for RHEL/CentOS will install the ``python-rados`` package for you. You may install ``python-rados`` diff --git a/doc/rados/api/python.rst b/doc/rados/api/python.rst index 4959801ff6f1..b4fd7e04dc1e 100644 --- a/doc/rados/api/python.rst +++ b/doc/rados/api/python.rst @@ -2,8 +2,7 @@ Librados (Python) =================== -The ``rados`` module is a thin Python wrapper for ``librados``. The source is -available in ``/src/pybind/rados.py``. You may also install it as a package. +The ``rados`` module is a thin Python wrapper for ``librados``. Installation ============ @@ -30,7 +29,7 @@ First, create a Python source file for your Ceph client. :: Import the Module ----------------- -To use the ``rados.py`` module, import it into your source file. +To use the ``rados`` module, import it into your source file. .. code-block:: python :linenos: @@ -395,4 +394,4 @@ operations, you should use the I/O context methods. .. _Getting Started: ../../../start .. _Storage Cluster Configuration: ../../configuration -.. _Getting librados for Python: ../librados-intro#getting-librados-for-python \ No newline at end of file +.. _Getting librados for Python: ../librados-intro#getting-librados-for-python -- 2.47.3