-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathsetup.py
67 lines (52 loc) · 1.79 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from configparser import ConfigParser
import setuptools
HERE = os.path.abspath(os.path.dirname(__file__))
def read_setup_cfg():
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
config_file = os.path.join(HERE, "setup.cfg")
cp = ConfigParser()
cp.read([config_file])
return cp
setup_cfg = read_setup_cfg()
VERSION = setup_cfg.get("metadata", "version")
print(setup_cfg)
def dbnd_package(name, extras=None):
pkg = name
if extras:
pkg += "[%s]" % ",".join(extras)
pkg += "==%s" % VERSION
return pkg
EXTRAS_REQUIRE = {
"run": [dbnd_package("dbnd-run")],
"airflow": [dbnd_package("dbnd-airflow")],
"airflow-auto-tracking": [dbnd_package("dbnd-airflow-auto-tracking")],
"airflow-versioned-dag": [dbnd_package("dbnd-airflow-versioned-dag")],
"airflow-export": [dbnd_package("dbnd-airflow-export")],
"aws": [dbnd_package("dbnd-aws")],
"azure": [dbnd_package("dbnd-azure")],
"databricks": [dbnd_package("dbnd-databricks")],
"docker": [dbnd_package("dbnd-docker")],
"gcp": [dbnd_package("dbnd-gcp")],
"hdfs": [dbnd_package("dbnd-hdfs")],
"mlflow": [dbnd_package("dbnd-mlflow")],
"qubole": [dbnd_package("dbnd-qubole")],
"spark": [dbnd_package("dbnd-spark")],
"postgres": [dbnd_package("dbnd-postgres")],
"redshift": [dbnd_package("dbnd-redshift")],
"snowflake": [dbnd_package("dbnd-snowflake")],
"tensorflow": [dbnd_package("dbnd-tensorflow")],
"luigi": [dbnd_package("dbnd-luigi")],
}
# Aliases:
EXTRAS_REQUIRE["k8s"] = EXTRAS_REQUIRE["docker"]
setuptools.setup(
name="databand",
install_requires=[dbnd_package("dbnd")],
extras_require=EXTRAS_REQUIRE,
)