forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·90 lines (77 loc) · 2.85 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
88
89
90
#!/usr/bin/env python
import re
from setuptools import find_packages, setup
# marker for extended/ignored and basic libs in requirements.txt
IGNORED_LIB_MARKER = '#extended-lib'
BASIC_LIB_MARKER = '#basic-lib'
# parameter variables
install_requires = []
extra_requires = []
dependency_links = []
package_data = {}
# determine version
with open('localstack/constants.py') as f:
constants = f.read()
version = re.search(r'^\s*VERSION\s*=\s*[\'"](.+)[\'"]\s*$', constants, re.MULTILINE).group(1)
# determine requirements
with open('requirements.txt') as f:
requirements = f.read()
for line in re.split('\n', requirements):
if line and line[0] == '#' and '#egg=' in line:
line = re.search(r'#\s*(.*)', line).group(1)
if line and line[0] != '#':
# include only basic requirements here
if IGNORED_LIB_MARKER not in line:
lib_stripped = line.split(' #')[0].strip()
if BASIC_LIB_MARKER in line:
install_requires.append(lib_stripped)
else:
extra_requires.append(lib_stripped)
# copy requirements file, to make it available inside the package at runtime
with open('localstack/requirements.copy.txt', 'w') as f:
f.write(requirements)
package_data = {
'': ['Makefile', '*.md'],
'localstack': [
'package.json',
'requirements*.txt',
'dashboard/web/*.*',
'dashboard/web/css/*',
'dashboard/web/img/*',
'dashboard/web/js/*',
'dashboard/web/views/*',
'utils/kinesis/java/cloud/localstack/*.*'
]}
if __name__ == '__main__':
setup(
name='localstack',
version=version,
description='LocalStack - A fully functional local Cloud stack',
author='Waldemar Hummer',
author_email='[email protected]',
url='https://github.com/localstack/localstack',
scripts=['bin/localstack', 'bin/localstack.bat'],
packages=find_packages(exclude=('tests', 'tests.*')),
package_data=package_data,
install_requires=install_requires,
extras_require={
'full': extra_requires
},
dependency_links=dependency_links,
test_suite='tests',
license='Apache License 2.0',
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Testing',
]
)