glusterfs/api/examples/setup.py.in
Niels de Vos c499ef86a2 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 <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 <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5835
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-02 13:04:03 -07:00

30 lines
1.0 KiB
Python

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.
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."""
setup(
name='glusterfs-api',
version='@PACKAGE_VERSION@',
description='Python client library for the GlusterFS libgfapi',
long_description=DESC,
author='Gluster Community',
author_email='gluster-devel@nongnu.org',
license='LGPLv3',
url='http://gluster.org/',
package_dir={'gluster':''},
packages=['gluster']
)