forked from gfronza/ecs-deploy.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
101 lines (89 loc) · 3.02 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
91
92
93
94
95
96
97
98
99
100
101
# -*- coding: utf-8 -*-
"""
setup.py
~~~~
"""
import sys
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
test_package_name = 'ecs_deploy'
def finalize_options(self):
TestCommand.finalize_options(self)
_test_args = [
'--verbose',
'--ignore=build',
'--cov', 'ecs_deploy',
'--cov-report', 'term-missing',
'--pep8',
'--cache-clear'
]
extra_args = os.environ.get('PYTEST_EXTRA_ARGS')
if extra_args is not None:
_test_args.extend(extra_args.split())
self.test_args = _test_args
self.test_suite = True
def run_tests(self):
import pytest
from pkg_resources import normalize_path, _namespace_packages
if sys.version_info >= (3,) and getattr(self.distribution,
'use_2to3', False):
module = self.test_package_name
if module in _namespace_packages:
del_modules = []
if module in sys.modules:
del_modules.append(module)
module += '.'
for name in sys.modules:
if name.startswith(module):
del_modules.append(name)
map(sys.modules.__delitem__, del_modules)
ei_cmd = self.get_finalized_command('egg_info')
self.test_args.append(normalize_path(ei_cmd.egg_base))
errno = pytest.main(self.test_args)
sys.exit(errno)
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(
name='ecs-deploy-py',
version='0.1.5',
url='https://github.com/skrater/ecs-deploy.py',
download_url='https://github.com/skrater/ecs-deploy.py/tarball/0.1.5',
license='MIT',
author='Cuttlesoft, LLC',
author_email='[email protected]',
description='Python script to instigate an automatic blue/green \
deployment using Task Definition and Service entities in Amazon\'s ECS',
long_description=open('README.rst').read() + '\n\n',
packages=find_packages(),
py_modules=['ecs_deploy'],
zip_safe=False,
platforms='any',
install_requires=[
'boto3>=1.9.17',
'botocore>=1.12.4',
'docutils>=0.12',
'futures>=3.0.5',
'jmespath>=0.9.0',
'python-dateutil>=2.5.3',
's3transfer>=0.1.4',
'six>=1.10.0'
],
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'],
entry_points={
'console_scripts': [
'ecs-deploy-py = ecs_deploy:main'
]
}
)