From c499ef86a2dfd4e7727ce876b6cf18ba79c94fe5 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 30 Sep 2013 09:05:14 +0200 Subject: gfapi.py: support dynamic loading of versioned libraries Currently gfapi.py only loads libraries by filename ending in ".so". On an installed system without development packages, the .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: http://review.gluster.org/5835 Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System --- api/examples/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'api/examples/Makefile.am') diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am index 6048bb1c8b7..cfb0d3dff84 100644 --- a/api/examples/Makefile.am +++ b/api/examples/Makefile.am @@ -1,4 +1,6 @@ -noinst_PROGRAMS = glfsxmp +EXTRA_PROGRAMS = glfsxmp glfsxmp_SOURCES = glfsxmp.c glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall -glfsxmp_LDADD = $(GLFS_LIBS) \ No newline at end of file +glfsxmp_LDADD = $(GLFS_LIBS) + +EXTRA_DIST = gfapi.py -- cgit