-
Notifications
You must be signed in to change notification settings - Fork 57
/
setup.py
87 lines (74 loc) · 2.12 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
import ast
import re
from setuptools import setup, find_packages
INSTALL_REQUIRES = [
'boto3>=1.4.2',
'botocore>=1.4.85',
'virtualenv',
]
STYLE_REQUIRES = [
'flake8>=2.5.4',
'pylint>=1.5.5',
]
TEST_REQUIRES = [
'coverage>=4.0.3',
'pytest>=2.9.1',
'moto>=0.4.23',
'mock',
'nose',
]
EXTRAS_REQUIRE = {
'test': TEST_REQUIRES,
'style': STYLE_REQUIRES,
# alias
'lint': STYLE_REQUIRES,
'test-requirements': TEST_REQUIRES + STYLE_REQUIRES,
}
def package_meta():
"""Read __init__.py for global package metadata.
Do this without importing the package.
"""
_version_re = re.compile(r'__version__\s+=\s+(.*)')
_url_re = re.compile(r'__url__\s+=\s+(.*)')
_license_re = re.compile(r'__license__\s+=\s+(.*)')
with open('lambda_uploader/__init__.py', 'rb') as ffinit:
initcontent = ffinit.read()
version = str(ast.literal_eval(_version_re.search(
initcontent.decode('utf-8')).group(1)))
url = str(ast.literal_eval(_url_re.search(
initcontent.decode('utf-8')).group(1)))
licencia = str(ast.literal_eval(_license_re.search(
initcontent.decode('utf-8')).group(1)))
return {
'version': version,
'license': licencia,
'url': url,
}
_lu_meta = package_meta()
setup(
name='lambda-uploader',
description='AWS Python Lambda Packager',
keywords='aws lambda',
version=_lu_meta['version'],
extras_require=EXTRAS_REQUIRE,
tests_require=TEST_REQUIRES + STYLE_REQUIRES,
install_requires=INSTALL_REQUIRES,
packages=find_packages(exclude=['tests']),
test_suite='tests',
classifiers=[
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
],
license=_lu_meta['license'],
author="Rackers",
maintainer_email="[email protected]",
url=_lu_meta['url'],
entry_points={
'console_scripts': [
'lambda-uploader=lambda_uploader.shell:main'
]
},
)