-
Notifications
You must be signed in to change notification settings - Fork 39
/
setup.py
61 lines (54 loc) · 2.03 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/python
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of libgfapi-python project which is a
# subproject of GlusterFS ( www.gluster.org)
#
# This file is licensed to you under your choice of the GNU Lesser
# General Public License, version 3 or any later version (LGPLv3 or
# later), or the GNU General Public License, version 2 (GPLv2), in all
# cases as published by the Free Software Foundation.
import os
import re
from setuptools import setup, find_packages
# Get version without importing.
gfapi_file_path = os.path.join(os.path.dirname(__file__),
'gluster/gfapi/__init__.py')
with open(gfapi_file_path) as f:
for line in f:
match = re.match(r"__version__.*'([0-9.]+)'", line)
if match:
version = match.group(1)
break
else:
raise Exception("Couldn't find version in setup.py")
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='gfapi',
version=version,
description='Python bindings for GlusterFS libgfapi',
long_description=read('README.rst'),
license='GPLv2 or LGPLv3+',
author='Red Hat, Inc.',
author_email='[email protected]',
url='http://www.gluster.org',
packages=find_packages(exclude=['test*']),
test_suite='nose.collector',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)', # noqa
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: System :: Filesystems',
],
)