Update the documentation

Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
This commit is contained in:
Mehdi Abaakouk 2016-02-17 10:13:31 +01:00
parent c4162b5988
commit 67f95c8f66
3 changed files with 24 additions and 6 deletions

View File

@ -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

View File

@ -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``

View File

@ -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
.. _Getting librados for Python: ../librados-intro#getting-librados-for-python