-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
82 lines (74 loc) · 2.1 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
import setuptools.command.easy_install
# -----------------------------------------------------------------------------
# Monkey-patch setuptools for performance, to avoid importing pkg_resources.
#
# This workaround is copied from BuildStream:
# https://gitlab.com/BuildStream/buildstream/blob/master/setup.py#L143
#
# That solution was inspired by https://github.com/ninjaaron/fast-entry_points
# which we believe was also inspired from the code from `setuptools` project.
#
TEMPLATE = '''\
# -*- coding: utf-8 -*-
import sys
from {0} import {1}
if __name__ == '__main__':
sys.exit({2}())'''
@classmethod
def get_args(cls, dist, header=None):
if header is None:
header = cls.get_header()
for name, ep in dist.get_entry_map('console_scripts').items():
cls._ensure_safe_name(name)
script_text = TEMPLATE.format(ep.module_name, ep.attrs[0], '.'.join(ep.attrs))
args = cls._get_script_args('console', name, header, script_text)
for res in args:
yield res
setuptools.command.easy_install.ScriptWriter.get_args = get_args
# -----------------------------------------------------------------------------
setuptools.setup(
name='mel',
url='https://github.com/aevri/mel',
author='Angelos Evripiotis',
author_email='[email protected]',
zip_safe=False,
packages=[
'mel',
'mel.cmd',
'mel.cmddebug',
'mel.lib',
'mel.micro',
'mel.rotomap',
],
entry_points={
'console_scripts': [
'mel=mel.cmd.mel:main',
'mel-debug=mel.cmddebug.meldebug:main',
]
},
install_requires=[
'colorama',
'opencv-python',
'pandas',
'pygame',
'pytorch-lightning',
'torch',
'torchvision',
'tqdm',
'wandb',
],
extras_require={
'dev': [
'black',
'docformatter',
'isort',
'nose',
'pycodestyle',
'pyflakes',
'pylint',
'pytest',
'vulture',
]
},
python_requires='>=3.8',
)