-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
73 lines (60 loc) · 1.72 KB
/
setup.py
File metadata and controls
73 lines (60 loc) · 1.72 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import re
import os
from os.path import dirname, abspath
from setuptools import setup, find_packages
def find_version(*paths):
fname = os.path.join(*paths)
with open(fname) as fhandler:
version_file = fhandler.read()
version_match = re.search(r"^__VERSION__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if not version_match:
raise RuntimeError("Unable to find version string in %s" % (fname,))
version = version_match.group(1)
return version
def find_readme(*paths):
with open(os.path.join(*paths)) as f:
return f.read()
version = find_version('kae', '__init__.py')
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
requires = [
'click==6.7',
'delegator.py==0.1.0',
'prettytable==0.7.2',
'pyyaml>=4.2b1',
'reprint==0.5.1',
'tqdm==4.23.4',
'jinja2==2.10',
'kaelib==0.0.12',
'python-keycloak==0.20.0',
]
root_dir = dirname(abspath(__file__))
setup(
name='kae',
version=version,
description='kubernetes app engine command line tool',
long_description=find_readme('README.md'),
long_description_content_type='text/markdown',
author='Yu Yang',
author_email='yangyu@geetest.com',
url='https://github.com/kaecloud/cli',
include_package_data=True,
packages=find_packages(root_dir),
install_requires=requires,
entry_points={
'console_scripts': [
'kae=kae.cli:main',
],
},
setup_requires=pytest_runner,
tests_require=[
"pytest-cov",
"pytest-randomly",
"pytest-mock",
"pytest>3.0",
],
)