-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
83 lines (67 loc) · 1.79 KB
/
Copy pathsetup.py
File metadata and controls
83 lines (67 loc) · 1.79 KB
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
#-*-coding:utf-8-*-
"""
@FileName:
setup.py
@Description:
setup for mnsim noc
@CreateTime:
2021/10/08 16:42
"""
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
HERE = os.path.dirname(os.path.abspath((__file__)))
# meta info for repo
NAME = "MNSIM_NoC"
with open(os.path.join(HERE, "mnsim_noc", "VERSION")) as f:
VERSION = f.read().strip()
LICENCE = "MIT"
URL = "https://github.com/ILTShade/MNSIM_NoC"
DESCRIPTION = "Dynamic Network no Chip implementation"
with open(os.path.join(HERE, "README.md")) as f:
LONG_DESCRIPTION = f.readlines()
AUTHORS = "Hanbo Sun, Zhenhua Zhu, Tongxin Xie"
EMAIL = "sunhanbo123@163.com"
# packages for install
PACKAGES = find_packages(exclude=["tests.*", "tests"])
PY_MODULES = []
with open(os.path.join(HERE, "requirements.txt")) as f:
INSTALL_REQUIRES = [v.strip() for v in f.readlines()]
EXTRAS_REQUIRE = dict()
TESTS_REQUIRE = [
"pytest",
"pytest-cov",
]
# extra pytest
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ["tests/", "-x", "--cov"]
self.test_suite = True
def run_tests(self):
import pytest
error = pytest.main(self.test_args)
sys.exit(error)
setup(
name=NAME,
version=VERSION,
license=LICENCE,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHORS,
author_email=EMAIL,
py_modules=PY_MODULES,
packages=PACKAGES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
tests_require=TESTS_REQUIRE,
entry_points={
"console_scripts": [
"mnsim_noc=mnsim_noc.main:main",
]
},
cmdclass={"test": PyTest},
zip_safe=True,
)