-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
47 lines (40 loc) · 1.17 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
from __future__ import print_function
import re
import ast
import sys
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('src/pvc/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1))
)
if (2, 7) <= sys.version_info < (3, 0):
dialog_package = 'python2-pythondialog'
elif sys.version_info >= (3, 0):
dialog_package = 'pythondialog'
else:
print('Unsupported Python version')
sys.exit(1)
setup(
name='pvc',
version=version,
description='Python vSphere Client with a dialog(1) interface',
long_description=open('README.rst').read(),
author='Marin Atanasov Nikolov',
author_email='[email protected]',
license='BSD',
url='https://github.com/dnaeon/pvc',
download_url='https://github.com/dnaeon/pvc/releases',
package_dir={'': 'src'},
packages=find_packages('src'),
scripts=[
'src/pvc-tui',
],
install_requires=[
'{} >= 3.2.1'.format(dialog_package),
'humanize >= 0.5.1',
'pyvmomi >= 5.5.0-2014.1.1',
'requests >= 2.6.0',
'vconnector >= 0.3.7',
]
)