forked from ersilia-os/ersilia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
105 lines (87 loc) · 2.93 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
97
98
99
100
101
102
103
104
105
from setuptools import setup, find_packages
def get_version(package_path):
import os
from importlib.util import module_from_spec, spec_from_file_location
spec = spec_from_file_location("version", os.path.join(package_path, "_version.py"))
module = module_from_spec(spec)
spec.loader.exec_module(module)
version = module.get_version_from_static()
return version
version = get_version("ersilia")
with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
# Slim requirements
slim = [
"inputimeout",
"emoji",
"validators",
"h5py",
"loguru",
"pyairtable<2",
"PyYAML",
"dockerfile-parse",
"tqdm",
"click",
"docker",
]
slim_requires = slim
# Lake requirements
lake_requires = slim_requires + ["isaura==0.1"]
# Doc builder requirements
doc_builder_requires = slim + ["sphinx", "jinja2"]
# Test requirements
test_requires = slim + ["pytest", "fuzzywuzzy"]
# Define extras requires
extras_require = {
"lake": lake_requires,
"docs": doc_builder_requires,
"test": test_requires,
}
setup(
name="ersilia",
version=version,
author="Ersilia Open Source Initiative",
author_email="hello@ersilia.io",
url="https://github.com/ersilia-os/ersilia",
description="A hub of AI/ML models for open source drug discovery and global health",
long_description=long_description,
long_description_content_type="text/markdown",
license="GPLv3",
python_requires=">=3.7",
install_requires=slim_requires,
extras_require=extras_require,
packages=find_packages(),
entry_points={"console_scripts": ["ersilia=ersilia.cli:cli"]},
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="drug-discovery machine-learning ersilia open-science global-health model-hub infectious-diseases",
project_urls={
"Landing page": "https://ersilia.io",
"Models": "https://ersilia.io/model-hub",
"Source Code": "https://github.com/ersilia-os/ersilia/",
},
package_data={"ersilia": ["hub/content/metadata/*.txt"]},
include_package_data=True,
)
# Install bentoml if necessary
def check_bentoml(package_path):
import os
from importlib.util import module_from_spec, spec_from_file_location
spec = spec_from_file_location(
"bentoml_requirement",
os.path.join(package_path, "setup", "requirements", "bentoml.py"),
)
module = module_from_spec(spec)
spec.loader.exec_module(module)
req = module.BentoMLRequirement()
if not req.is_bentoml_ersilia_version():
req.install()
return version
check_bentoml("ersilia")