From: Mehdi Abaakouk Date: Tue, 16 Feb 2016 11:05:07 +0000 (+0100) Subject: librbdpy: Use new rados lib X-Git-Tag: v10.1.0~369^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c4162b5988d3dbb098e4fd1093a9eaa3d21a96b8;p=ceph.git librbdpy: Use new rados lib Signed-off-by: Mehdi Abaakouk --- diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index a03d97578d3a..c7ae45aed751 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -21,6 +21,9 @@ from libc.stdlib cimport realloc, free from collections import Iterable +cimport rados + + cdef extern from "Python.h": # These are in cpython/string.pxd, but use "object" types instead of # PyObject*, which invokes assumptions in cpython that we need to @@ -296,8 +299,9 @@ cdef make_ex(ret, msg): else: return Error(msg + (": error code %d" % ret)) -cdef rados_ioctx_t convert_ioctx(ioctx) except? NULL: - return ioctx.io.value + +cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL: + return ioctx.io cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr): return 0 diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py index 1eda454c392c..ec2f3a2ca19a 100755 --- a/src/pybind/rbd/setup.py +++ b/src/pybind/rbd/setup.py @@ -44,7 +44,9 @@ setup( ["rbd.pyx"], libraries=["rbd"] ) - ], build_dir=os.environ.get("CYTHON_BUILD_DIR", None)), + ], build_dir=os.environ.get("CYTHON_BUILD_DIR", None), include_path=[ + os.path.join(os.path.dirname(__file__), "..", "rados")] + ), cmdclass={ "egg_info": EggInfoCommand, },