forked from aspuru-guzik-group/olympus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (60 loc) · 1.99 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
"""Olympus
Some description here...
"""
from setuptools import find_packages, setup
import versioneer
def readme():
with open("README.md") as f:
return f.read()
# taken from https://hanxiao.io/2019/11/07/A-Better-Practice-for-Managing-extras-require-Dependencies-in-Python/
def get_extra_requires(path, add_all=True):
import re
from collections import defaultdict
with open(path) as content:
extra_deps = defaultdict(set)
for entry in content:
if entry.strip() and not entry.startswith("#"):
tags = set()
if ":" in entry:
package, tag_list = entry.split(":")
tags.update(
tag_entry.strip() for tag_entry in tag_list.split(",")
)
tags.add(re.split("[<=>]", package)[0])
for tag in tags:
extra_deps[tag].add(package)
if add_all:
extra_deps["all"] = set(
vv for v in extra_deps.values() for vv in v
)
return extra_deps
# -----
# Setup
# -----
setup(
name="olympus",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="some description",
long_description=readme(),
classifiers=[
"Programming Language :: Python",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
],
url="https://github.com/FlorianHase/olympus",
author="Florian Hase",
author_email="",
# license='XXX',
packages=find_packages(where="src", include=["olympus*"]),
package_dir={"": "src"},
zip_safe=False,
tests_require=["pytest"],
install_requires=["numpy", "pandas", "scikit-learn",
"matplotlib", "seaborn", "SQLAlchemy==1.4.45"],
python_requires=">=3.6",
extras_require=get_extra_requires("extra_requirements.txt"),
entry_points={
"console_scripts": ["olympus = olympus.cli.main:entry_point"]
},
)