]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbdpy: Use new rados lib
authorMehdi Abaakouk <sileht@redhat.com>
Tue, 16 Feb 2016 11:05:07 +0000 (12:05 +0100)
committerMehdi Abaakouk <sileht@redhat.com>
Wed, 17 Feb 2016 11:32:39 +0000 (12:32 +0100)
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
src/pybind/rbd/rbd.pyx
src/pybind/rbd/setup.py

index a03d97578d3aea2c6b7da83148189492cf3f546d..c7ae45aed751091df93bed7a70c95db78c6b53a3 100644 (file)
@@ -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 <rados_ioctx_t><uintptr_t>ioctx.io.value
+
+cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
+    return <rados_ioctx_t>ioctx.io
 
 cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
     return 0
index 1eda454c392cb984ecb5ecc3487616aef38ab7d9..ec2f3a2ca19aabf28daa2273067810d33fd4cf3c 100755 (executable)
@@ -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,
     },