forked from cloudtools/troposphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
95 lines (75 loc) · 2.75 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
# -*- coding: utf-8 -*-
"""
Setup
-----
Install troposphere in the current python environment.
"""
# ----------------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------------
# ---- Future
from __future__ import print_function
from __future__ import with_statement
# ---- System
import os
from setuptools import setup
# ----------------------------------------------------------------------------
# Helper Functions
# ----------------------------------------------------------------------------
def file_contents(file_name):
"""Given a file name to a valid file returns the file object."""
curr_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(curr_dir, file_name)) as the_file:
contents = the_file.read()
return contents
def get_version():
curr_dir = os.path.abspath(os.path.dirname(__file__))
with open(curr_dir + "/troposphere/__init__.py", "r") as init_version:
for line in init_version:
if "__version__" in line:
return str(line.split("=")[-1].strip(" ")[1:-2])
# ----------------------------------------------------------------------------
# Setup
# ----------------------------------------------------------------------------
setup(
name='troposphere',
version=get_version(),
description="AWS CloudFormation creation library",
long_description=file_contents("README.rst"),
long_description_content_type='text/x-rst',
author="Mark Peek",
author_email="[email protected]",
license="New BSD license",
url="https://github.com/cloudtools/troposphere",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 2.7",
],
packages=[
'troposphere',
'troposphere.openstack',
'troposphere.helpers'
],
scripts=[
'scripts/cfn',
'scripts/cfn2py'
],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
install_requires=file_contents("requirements.txt"),
test_suite="tests",
tests_require=["awacs>=0.8"],
extras_require={'policy': ['awacs>=0.8']},
use_2to3=True,
)