diff options
author | Prashanth Pai <ppai@redhat.com> | 2016-08-09 14:25:31 +0530 |
---|---|---|
committer | Prashanth Pai <ppai@redhat.com> | 2016-08-09 14:37:15 +0530 |
commit | d4b8804abb876bda9803cee61c6c4298b475e6be (patch) | |
tree | edc8089169dd365447eaac8d6165f2409da5afff /setup.py | |
parent | 5d09981197e5f13003b05f9c1bc7f67141c068f7 (diff) |
Simplify packaging
* Rename .unittests.sh to .unitests
* Fix entries in MANIFEST.in file
* Mover version declaration to gfapi.py
TODO: Fix the spec file. That'll be sent as a separate change.
Change-Id: I0cba8964c1ecc337128c8edc9f301fc1d023bd28
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -10,18 +10,28 @@ # 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 -from gluster import __canonical_version__ as version - -name = 'gfapi' +# Get version without importing. +gfapi_file_path = os.path.join(os.path.dirname(__file__), 'gluster/gfapi.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") setup( - name=name, + name='gfapi', version=version, description='Python bindings for GlusterFS libgfapi', + long_description='Python bindings for GlusterFS libgfapi', license='GPLv2 or LGPLv3+', author='Red Hat, Inc.', author_email='gluster-devel@gluster.org', @@ -40,7 +50,4 @@ setup( 'Programming Language :: Python :: 2.7' 'Topic :: System :: Filesystems' ], - install_requires=[], - scripts=[], - entry_points={}, ) |