forked from zadarastorage/zadarapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (29 loc) · 1.06 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
import os
import subprocess
from setuptools import setup, find_packages
from zadarapy import __version__
def get_git_revision():
"""Return the git revision."""
if os.path.exists('PKG-INFO'):
with open('PKG-INFO') as package_info:
for key, value in (line.split(':', 1) for line in package_info):
if key.startswith('Version'):
return value.strip()
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
setup(
name='zadarapy',
version=get_git_revision(),
packages=find_packages(),
install_requires=['configparser>=3.5.0', 'future>=0.15.2',
'terminaltables>=2.1.0', 'requests>=2.2.1'],
url='https://github.com/zadarastorage/zadarapy',
license='Apache License 2.0',
author='Jeremy Brown',
author_email='[email protected]',
description='Python module and command line interface with Zadara REST '
'APIs',
entry_points={
'console_scripts': ['zadarapy=zadarapy.bin.command_line:main'],
},
zip_safe=False,
)