Skip to content

Commit

Permalink
doc: add doc for pybind of rgw
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Nov 9, 2016
1 parent cb351a9 commit 8fd9543
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
58 changes: 19 additions & 39 deletions admin/build-doc
Expand Up @@ -72,49 +72,29 @@ mkdir -p $vdir/lib
export LD_LIBRARY_PATH="$vdir/lib" export LD_LIBRARY_PATH="$vdir/lib"
export PYTHONPATH=$TOPDIR/src/pybind 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
BUILD_DOC=1 \
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 # FIXME(sileht): I dunno how to pass the include-dirs correctly with pip
# for build_ext step, it should be: # for build_ext step, it should be:
# --global-option=build_ext --global-option="--cython-include-dirs $TOPDIR/src/pybind/rados/" # --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 # 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/ for bind in rados rbd cephfs rgw; do
cp -f $TOPDIR/src/pybind/rados/rados.pxd $TOPDIR/src/pybind/cephfs/ if [ ${bind} != rados ]; then

cp -f $TOPDIR/src/pybind/rados/rados.pxd $TOPDIR/src/pybind/${bind}/
ln -sf librbd.so.1 $vdir/lib/librbd.so fi
gcc -shared -o $vdir/lib/librbd.so.1 -xc /dev/null ln -sf lib${bind}.so.1 $vdir/lib/lib${bind}.so
BUILD_DOC=1 \ gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc /dev/null
CFLAGS="-iquote$TOPDIR/src/include" \ BUILD_DOC=1 \
CPPFLAGS="-iquote$TOPDIR/src/include" \ CFLAGS="-iquote$TOPDIR/src/include" \
LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \ CPPFLAGS="-iquote$TOPDIR/src/include" \
$vdir/bin/pip install $TOPDIR/src/pybind/rbd LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \
nm $vdir/lib/python*/*-packages/rbd.so | grep 'U rbd_' | \ $vdir/bin/pip install $TOPDIR/src/pybind/${bind}
awk '{ print "void "$2"(void) {}" }' | \ # rgwfile_version(), librgw_create(), rgw_mount()
gcc -shared -o $vdir/lib/librbd.so.1 -xc - nm $vdir/lib/python*/*-packages/${bind}.so | grep -E "U (lib)?${bind}" | \

awk '{ print "void "$2"(void) {}" }' | \

gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc -
ln -sf libcephfs.so.1 $vdir/lib/libcephfs.so if [ ${bind} != rados ]; then
gcc -shared -o $vdir/lib/libcephfs.so.1 -xc /dev/null rm -f $TOPDIR/src/pybind/${bind}/rados.pxd
BUILD_DOC=1 \ fi
CFLAGS="-iquote$TOPDIR/src/include" \ done
CPPFLAGS="-iquote$TOPDIR/src/include" \
LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \
$vdir/bin/pip install $TOPDIR/src/pybind/cephfs
nm $vdir/lib/python*/*-packages/cephfs.so | grep 'U cephfs_' | \
awk '{ print "void "$2"(void) {}" }' | \
gcc -shared -o $vdir/lib/libcephfs.so.1 -xc -

rm -f $TOPDIR/src/pybind/rbd/rados.pxd $TOPDIR/src/pybind/cephfs/rados.pxd



$vdir/bin/sphinx-build -a -n -b dirhtml -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/html $vdir/bin/sphinx-build -a -n -b dirhtml -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/html
$vdir/bin/sphinx-build -a -b man -t man -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/man $vdir/bin/sphinx-build -a -b man -t man -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/man
Expand Down
6 changes: 6 additions & 0 deletions doc/api/index.rst
Expand Up @@ -26,6 +26,12 @@ See `librbdpy`_.


.. _librbdpy: ../rbd/librbdpy .. _librbdpy: ../rbd/librbdpy


Ceph RADOS Gateway APIs
=======================

See `librgw-py`_.

.. _librgw-py: ../radosgw/api


Calamari APIs Calamari APIs
============= =============
Expand Down
14 changes: 14 additions & 0 deletions doc/radosgw/api.rst
@@ -0,0 +1,14 @@
===============
librgw (Python)
===============

.. highlight:: python

The `rgw` python module provides file-like access to rgw.

API Reference
=============

.. automodule:: rgw
:members: LibRGWFS, FileHandle

File renamed without changes.

0 comments on commit 8fd9543

Please sign in to comment.