-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
72 lines (61 loc) · 2.49 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
import os
from pathlib import Path
from setuptools import setup, find_packages
setup_requirements = ["pytest-runner", "setuptools_scm"]
on_rtd = os.environ.get("READTHEDOCS") == "True"
def requirements(fp: str):
with open(os.path.join(os.path.dirname(__file__), "requirements", fp)) as f:
return [
r.strip()
for r in f.readlines()
if r.strip() and not r.startswith("#") and not r.startswith("-")
]
extras_require = {
"mlflow": requirements("mlflow_requirements.in"),
"postgres": requirements("postgres_requirements.in"),
"tests": requirements("test_requirements.txt"),
}
full_extras = extras_require["mlflow"] + extras_require["postgres"]
extras_require["full"] = full_extras
extras_require["docs"] = requirements("docs_requirements.in") + full_extras
install_requires = requirements("requirements.in") # Allow flexible deps for install
# Read the docs have quite low memory limits on their build servers, so low
# that pip crashes when downloading tensorflow. So we must remove it from the install
# requirements, and set up autodoc_mock_imports in docs/conf.py
if on_rtd:
install_requires = [req for req in install_requires if "tensorflow" not in req]
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setup(
author="Equinor ASA",
author_email="fg_gpl@equinor.com",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
description="Train and build models for Argo / Kubernetes",
long_description=long_description,
long_description_content_type="text/markdown",
entry_points={"console_scripts": ["gordo=gordo.cli:gordo"]},
install_requires=install_requires,
license="AGPLv3",
name="gordo",
packages=find_packages(),
setup_requires=setup_requirements,
test_suite="tests",
tests_require=extras_require["tests"],
extras_require=extras_require,
url="https://github.com/equinor/gordo",
use_scm_version={"write_to": "gordo/_version.py", "relative_to": __file__},
zip_safe=True,
package_data={
"": [
"gordo/workflow/workflow_generator/resources/argo-workflow.yml.template",
"gordo/machine/dataset/data_provider/resources/assets_config.yaml",
]
},
include_package_data=True,
)