path: root/api/examples/
diff options
authorNiels de Vos <>2013-09-30 09:05:14 +0200
committerAnand Avati <>2013-10-02 13:04:03 -0700
commitc499ef86a2dfd4e7727ce876b6cf18ba79c94fe5 (patch)
treecfe2a3ec9a71a8901f5e482a179caec56020a056 /api/examples/
parenta66bf67965dddd9decd9210c3a530fdc85b6430c (diff) support dynamic loading of versioned libraries
Currently only loads libraries by filename ending in ".so". On an installed system without development packages, the <lib>.so filenames are not available. ctypes.util.find_library() can be used to detect the files dynamically. In addition to this, also fixing some minor indention errors and package the library into the Python site-packages path. Python applications and libraries can now access libgfapi through 'from glusterfs import gfapi'. Change-Id: I71e38dabd3ade5dcf24813bf2fc25cda91b571c6 BUG: 1005146 Signed-off-by: Niels de Vos <> Reviewed-on: Reviewed-by: Kaleb KEITHLEY <> Tested-by: Gluster Build System <>
Diffstat (limited to 'api/examples/')
1 files changed, 29 insertions, 0 deletions
diff --git a/api/examples/ b/api/examples/
new file mode 100644
index 000000000..44b738094
--- /dev/null
+++ b/api/examples/
@@ -0,0 +1,29 @@
+from distutils.core import setup
+# generate a for the package namespace
+fo = open('', 'w')
+fo.write('__version__ = "@PACKAGE_VERSION@"\n')
+DESC = """GlusterFS is a clustered file-system capable of scaling to
+several petabytes. It aggregates various storage bricks over Infiniband
+RDMA or TCP/IP interconnect into one large parallel network file system.
+GlusterFS is one of the most sophisticated file systems in terms of
+features and extensibility. It borrows a powerful concept called
+Translators from GNU Hurd kernel. Much of the code in GlusterFS is in
+user space and easily manageable.
+This package contains the Python interface to the libgfapi library."""
+ name='glusterfs-api',
+ version='@PACKAGE_VERSION@',
+ description='Python client library for the GlusterFS libgfapi',
+ long_description=DESC,
+ author='Gluster Community',
+ author_email='',
+ license='LGPLv3',
+ url='',
+ package_dir={'gluster':''},
+ packages=['gluster']