-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
47 lines (42 loc) · 1.32 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
# Copyright (c) 2020-2024 Antmicro <www.antmicro.com>
#
# SPDX-License-Identifier: Apache-2.0
from pathlib import Path
import numpy
import setuptools
from Cython.Build import cythonize
with open("README.md", "r") as fh:
long_description = fh.read()
project_path = (
Path(__file__).parent / "kenning/sparsity_aware_kernel"
).absolute()
setuptools.setup(
packages=setuptools.find_packages(),
long_description=long_description,
include_package_data=True,
extras_require={
"sparsity-aware-kernel": [
f"kenning-sparsity-aware-kernel @ file://{project_path}"
]
},
ext_modules=cythonize(
[
setuptools.Extension(
"kenning.modelwrappers.instance_segmentation.cython_nms",
sources=[
"kenning/modelwrappers/instance_segmentation/cython_nms.pyx"
],
include_dirs=[numpy.get_include()],
),
setuptools.Extension(
"kenning.utils.renode_profiler_parser",
sources=[
"kenning/utils/renode_profiler_parser/caller.pyx",
"kenning/utils/renode_profiler_parser/parser.cpp",
],
language="c++",
extra_compile_flags=["-O3", "-Os"],
),
],
),
)