-
Notifications
You must be signed in to change notification settings - Fork 22
/
setup.py
76 lines (66 loc) · 2.36 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
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
with open("VERSION") as version_fd:
VERSION = version_fd.read().strip()
with open("README.rst") as readme_fd:
long_description = readme_fd.read()
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = "verify that the git tag matches our version"
def run(self):
if os.getenv("CIRCLE_TAG") == None:
sys.exit(
"FAILED: Your CIRCLE_TAG variable appears to be unset. Are you running on CircleCI triggered by tag?"
)
else:
tag = os.getenv("CIRCLE_TAG")
if tag != "v" + VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
setup(
name="terraformpy",
version=VERSION,
author="Evan Borgstrom",
author_email="eborgstrom@nerdwallet.com",
description="Terraformpy is a library and command line tool to supercharge "
"your Terraform configs using a full fledged Python environment!",
url="https://github.com/NerdWalletOSS/terraformpy",
long_description=long_description,
packages=find_packages("src"),
package_dir={"": "src"},
install_requires=["schematics>=2.0,<3.0", "six>=1.11,<2"],
extras_require={
'dev:python_version <= "2.7"': [
"pytest>=4.6,<4.7",
],
'dev:python_version > "3"': [
"pytest>=5.0,<6",
],
"dev": {"pytest-cov", "pytest-mock", "codecov"},
},
entry_points={
"console_scripts": [
"terraformpy = terraformpy.cli:main",
],
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Pre-processors",
"Topic :: System :: Systems Administration",
],
cmdclass={
"verify": VerifyVersionCommand,
},
)