-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
96 lines (79 loc) · 2.38 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
#!/usr/bin/env python
# -*- coding: utf-8 -*
import os
import pathlib
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = "1.3.1"
REPO_ROOT = pathlib.Path(__file__).parent
with open(REPO_ROOT / "README.md", encoding="utf-8") as f:
README = f.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):
tag = os.getenv("CIRCLE_TAG")
if tag != VERSION:
info = f"Git tag: {tag} does not match the version of this app: {VERSION}"
sys.exit(info)
REQUIREMENTS = [
# Security constraints
"urllib3>=1.24.2",
# Http
"requests",
# Sqlalchemy
"sqlalchemy>=1.4",
# SFTP
"paramiko",
# Utils
"pandas",
"click",
"pyyaml",
"importlib_metadata>3.7.0",
]
PLUGINS = {
"s3": "tentaclio_s3",
"athena": "tentaclio_athena",
"postgres": "tentaclio_postgres",
"databricks": "tentaclio_databricks>=1.0.0",
"gdrive": "tentaclio_gdrive",
"gs": "tentaclio_gs",
"snowflake": "tentaclio_snowflake"
}
setup_args = dict(
# Description
name="tentaclio",
version=VERSION,
description="Unification of data connectors for distributed data tasks",
long_description=README,
long_description_content_type="text/markdown",
# Credentials
author="Octopus Energy",
author_email="[email protected]",
url="https://github.com/octoenergy/tentaclio",
license="MIT",
# Package data
package_dir={"": "src"},
packages=find_packages("src", include=["*tentaclio*"]),
include_package_data=False,
# Dependencies
install_requires=REQUIREMENTS,
extras_require=PLUGINS,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Typing :: Typed",
],
cmdclass={"verify": VerifyVersionCommand},
)
if __name__ == "__main__":
# Make install
setup(**setup_args)