summaryrefslogtreecommitdiffstats
path: root/api/examples
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-04-22 15:37:09 +0000
committerJeff Darcy <jdarcy@redhat.com>2014-04-22 15:37:09 +0000
commita827c5eab32a43ade5551259ea56a6a1af7e861b (patch)
treee6707df68f72baa8645210ba931272285116ad85 /api/examples
parent46d333783a968ab39e0beade9c7a1eec8035f8b1 (diff)
parent99bfc2a2a1689da1e173cb2f8ef54d2b09ef3a5d (diff)
Merge branch 'upstream'
Conflicts: glusterfs.spec.in xlators/mgmt/glusterd/src/Makefile.am xlators/mgmt/glusterd/src/glusterd-utils.c xlators/mgmt/glusterd/src/glusterd.h Change-Id: I27bdcf42b003cfc42d6ad981bd2bf8180176806d
Diffstat (limited to 'api/examples')
-rw-r--r--api/examples/Makefile.am6
-rw-r--r--api/examples/__init__.py.in1
-rwxr-xr-xapi/examples/getvolfile.py4
-rw-r--r--api/examples/setup.py.in5
4 files changed, 8 insertions, 8 deletions
diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am
index 05f40ff53..f1a8d12b2 100644
--- a/api/examples/Makefile.am
+++ b/api/examples/Makefile.am
@@ -1,6 +1,10 @@
+# The bits needed for glfsxmp
EXTRA_PROGRAMS = glfsxmp
glfsxmp_SOURCES = glfsxmp.c
glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall
glfsxmp_LDADD = $(GLFS_LIBS) -lrt
-EXTRA_DIST = gfapi.py
+# Install __init__.py (a generated file), and gfapi.py into
+# the Python site-packages area
+pygfapidir = $(pythondir)/gluster
+pygfapi_PYTHON = __init__.py gfapi.py
diff --git a/api/examples/__init__.py.in b/api/examples/__init__.py.in
new file mode 100644
index 000000000..280beb2dc
--- /dev/null
+++ b/api/examples/__init__.py.in
@@ -0,0 +1 @@
+__version__ = "@PACKAGE_VERSION@"
diff --git a/api/examples/getvolfile.py b/api/examples/getvolfile.py
index 82d9db055..184586c63 100755
--- a/api/examples/getvolfile.py
+++ b/api/examples/getvolfile.py
@@ -5,8 +5,8 @@ import ctypes.util
api = ctypes.CDLL(ctypes.util.find_library("gfapi"))
api.glfs_get_volfile.argtypes = [ctypes.c_void_p,
- ctypes.c_void_p,
- ctypes.c_ulong]
+ ctypes.c_void_p,
+ ctypes.c_ulong]
api.glfs_get_volfile.restype = ctypes.c_long;
def get_volfile (host, volume):
diff --git a/api/examples/setup.py.in b/api/examples/setup.py.in
index 44b738094..f22fa1f30 100644
--- a/api/examples/setup.py.in
+++ b/api/examples/setup.py.in
@@ -1,10 +1,5 @@
from distutils.core import setup
-# generate a __init__.py for the package namespace
-fo = open('__init__.py', 'w')
-fo.write('__version__ = "@PACKAGE_VERSION@"\n')
-fo.close()
-
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.