-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathsetup.py
81 lines (71 loc) · 2.06 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
#!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import find_packages, setup
def with_versioneer(f, default=None):
"""Attempts to execute the supplied single-arg function by passing it
versioneer if available; else, returns the default.
"""
try:
import versioneer
return f(versioneer)
except ModuleNotFoundError:
return default
def readme():
try:
with open("README.md") as f:
return f.read()
except Exception:
return None
REQUIRED_PACKAGES = [
"absl-py",
"blessings",
"commentjson==0.8.3",
"google-api-python-client",
"pyyaml",
"tqdm>=4.45.0",
"kubernetes>=10.0.1",
"google-auth>=1.19.0",
"google-cloud-core>=1.0.3",
"google-cloud-container>=0.3.0",
"psycopg2-binary==2.9.6",
"schema==0.7.5",
"urllib3>=1.25.7",
"yaspin>=0.16.0",
"SQLAlchemy==1.3.11",
"pg8000==1.16.1",
]
setup(
name="caliban",
version=with_versioneer(lambda v: v.get_version()),
cmdclass=with_versioneer(lambda v: v.get_cmdclass(), {}),
description="Docker-based job runner for AI research.",
long_description=readme(),
long_description_content_type="text/markdown",
python_requires=">=3.6.0",
author="Caliban Team",
author_email="[email protected]",
url="https://github.com/google/caliban",
license="Apache-2.0",
packages=find_packages(exclude=("tests", "docs")),
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
entry_points={
"console_scripts": [
"caliban = caliban.main:main",
"expansion = caliban.expansion:main",
]
},
)