-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
68 lines (56 loc) · 1.99 KB
/
Copy pathsetup.py
File metadata and controls
68 lines (56 loc) · 1.99 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
from __future__ import print_function
"""setup.py controls the build, testing, and distribution of the egg"""
from setuptools import setup, find_packages
import re
import os.path
VERSION_REGEX = re.compile(r"""
^__version__\s=\s
['"](?P<version>.*?)['"]
""", re.MULTILINE | re.VERBOSE)
VERSION_FILE = os.path.join("astroscaler", "version.py")
def get_long_description():
"""Reads the long description from the README"""
try:
import pypandoc
return pypandoc.convert('README.md', 'rst')
except Exception as ex:
print("Unable to convert README to RST: '{}'".format(ex))
return ""
def get_version():
"""Reads the version from the package"""
with open(VERSION_FILE) as handle:
lines = handle.read()
result = VERSION_REGEX.search(lines)
if result:
return result.groupdict()["version"]
else:
raise ValueError("Unable to determine __version__")
def get_requirements():
"""Reads the installation requirements from requirements.txt"""
with open("requirements.txt") as reqfile:
return [line for line in reqfile.read().split("\n") if not line.startswith(('#', '-'))]
setup(
name='astroscaler',
version=get_version(),
description="Implementation of a AWS Lambda function that executes autoscaling policies.",
long_description=get_long_description(),
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
],
keywords='',
author='Amplify Education',
author_email='[email protected]',
url='',
license='MIT',
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
zip_safe=False,
dependency_links=[
],
install_requires=get_requirements(),
test_suit='nose.collector',
)