]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Update the documentation
authorMehdi Abaakouk <sileht@redhat.com>
Wed, 17 Feb 2016 09:13:31 +0000 (10:13 +0100)
committerMehdi Abaakouk <sileht@redhat.com>
Wed, 17 Feb 2016 14:16:56 +0000 (15:16 +0100)
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
admin/build-doc
doc/rados/api/librados-intro.rst
doc/rados/api/python.rst

index 37cb8c90767cfce5bf730ab8dccd1330964dadf6..fe7cf97988d45aee2bcae47ec9891e3aa3f8dbba 100755 (executable)
@@ -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
 
index e43e665d8e4b911cbcc244457467f826a54d9b38..654968b6ca3ebe39247812be3834ea501c0f419f 100644 (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``
index 4959801ff6f1c9e2cfcb5414be3f289a961f4e22..b4fd7e04dc1ef24ded1e879b3d502c80163dc5b8 100644 (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
\ No newline at end of file
+.. _Getting librados for Python: ../librados-intro#getting-librados-for-python