-
Notifications
You must be signed in to change notification settings - Fork 51
/
setup.py
60 lines (53 loc) · 1.31 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
# -*- coding: utf-8 -*-
"""
setup script
"""
import os
import re
import sys
from setuptools import find_packages
from setuptools import setup
if sys.version_info < (3, 6):
raise RuntimeError("lichee requires Python 3.6+")
def read_version():
"""
read version from __init__.py
:return: version
"""
regexp = re.compile(r"^__version__\W*=\W*'([\d.abrc]+)'")
init_py = os.path.join(os.path.dirname(__file__), "lichee", "__init__.py")
with open(init_py) as f:
for line in f:
match = regexp.match(line)
if match is not None:
return match.group(1)
raise RuntimeError("Cannot find version in {}".format(init_py))
setup(
name="lichee",
version=read_version(),
url="",
project_urls={
"Documentation": "",
"Code": "",
"Issue tracker": "",
},
maintainer="",
description="",
python_requires=">=3.6",
install_requires=[
"PyYAML>=3.10",
"torch",
"torchvision",
"numpy",
"yacs",
"scipy",
"scikit-learn",
"protobuf",
"cgroup_parser"
],
extras_require={
'dev': ['pytest', 'pyyaml']
},
package_data={'': ['*.yaml', '*.so', '*.txt', '*.pyx', '*.pxd']},
packages=find_packages(include=("lichee", "lichee.*")),
)