-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
90 lines (77 loc) · 2.7 KB
/
setup.py
File metadata and controls
90 lines (77 loc) · 2.7 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
"""setup.py controls the build, testing, and distribution of the egg"""
from __future__ import print_function
import re
import os.path
from setuptools import setup, find_packages
VERSION_REGEX = re.compile(
r"""
^__version__\s=\s
['"](?P<version>.*?)['"]
""",
re.MULTILINE | re.VERBOSE,
)
VERSION_FILE = os.path.join("terrawrap", "version.py")
def get_long_description():
"""Reads the long description from the README"""
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as file:
return file.read()
def get_version():
"""Reads the version from the package"""
with open(VERSION_FILE, encoding="utf-8") as handle:
lines = handle.read()
result = VERSION_REGEX.search(lines)
if result:
return result.groupdict()["version"]
raise ValueError("Unable to determine __version__")
def get_requirements():
"""Reads the installation requirements from requirements.txt"""
with open("requirements.txt", encoding="utf-8") as reqfile:
return [
line
for line in reqfile.read().split("\n")
if not line.startswith(("#", "-"))
]
setup(
name="terrawrap",
python_requires=">=3.10.0",
version=get_version(),
description="Set of Python-based CLI tools for working with Terraform configurations",
long_description=get_long_description(),
long_description_content_type="text/markdown",
# Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
],
keywords="",
author="Amplify Education",
author_email="github@amplify.com",
url="https://github.com/amplify-education/terrawrap",
license="MIT",
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=get_requirements(),
test_suite="nose.collector",
scripts=[
"bin/tf",
"bin/tf_apply",
"bin/backend_check",
"bin/pipeline_check",
"bin/plan_check",
"bin/visualize",
"bin/graph_apply",
"bin/tf_move",
],
)