-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
80 lines (68 loc) · 2.11 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
import glob
import os
import re
import subprocess
import sys
import setuptools
def get_info():
with open("README.md", "r") as fh:
long_description = fh.read()
version = re.search(
r'^__version__\s*=\s*"(.*)"',
open("event_library/__init__.py").read(),
re.MULTILINE,
).group(1)
return long_description, version
long_description, version = get_info()
def install_subs():
base_third_parties_dir = "./third_parties"
for sub_mod in glob.glob(os.path.join(base_third_parties_dir, "*.whl")):
print(f"Installing {sub_mod}")
subprocess.call([sys.executable, "-m", "pip", "install", sub_mod])
subdirs = [
os.path.join(base_third_parties_dir, o)
for o in os.listdir(base_third_parties_dir)
if os.path.isdir(os.path.join(base_third_parties_dir, o))
]
for sub_mod in subdirs:
submod_setup_path = sub_mod + "/setup.py"
if os.path.exists(submod_setup_path):
# Run submodule setup.py file
print(f"Installing {sub_mod}")
subprocess.call(
[
sys.executable,
"-m",
"pip",
"install",
os.getcwd() + "/" + sub_mod + "/",
]
)
long_description, version = get_info()
setuptools.setup(
name="event_library",
version="0.2",
author="Gianluca Scarpellini",
author_email="gianluca.scarpellini@iit.it",
description="Event library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/gianscarpe/event_library",
packages=setuptools.find_packages(exclude=("tests", "scripts")),
install_requires=[
"opencv-python",
"hydra-core",
"matplotlib",
"numpy",
"torch",
"snntoolbox",
"hyperopt",
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GPL License",
"Operating System :: Linux",
],
python_requires=">=3.8",
)
install_subs()