-
Notifications
You must be signed in to change notification settings - Fork 19
/
setup.py
61 lines (53 loc) · 2.12 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
# Copyright 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache 2.0
#!/usr/bin/env python
import os
import versioneer
from setuptools import find_namespace_packages, find_packages
if not os.getenv("DPBENCH_SYCL"):
from setuptools import setup
cmake_args = None
else:
from skbuild import setup
from skbuild.platform_specifics import windows
cmake_args = ["-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"]
# Monkey patch msvc compiler environment, so scikit-build does not overwrite
# it. Make sure to set desired environment using:
# > vcvars64.bat -vcvars_ver=<vcvars_ver>
# TODO: monkey patch abstract.CMakePlatform.compile_test_cmakelist or
# abstract.CMakePlatform.get_best_generator instead to chose right
# complier. It will produce more stable output. We may avoid setting up
# MSVC environment manually this way.
windows._get_msvc_compiler_env = lambda v, t: windows.CachedEnv()
setup(
# https://github.com/pypa/packaging-problems/issues/606
url="https://github.com/IntelPython/dpbench",
packages=(
find_packages(include=["dpbench*"], exclude=["dpbench.benchmarks*"])
+ find_namespace_packages(include=["dpbench.benchmarks*"])
+ find_namespace_packages(include=["dpbench.configs*"])
),
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
include_package_data=True,
package_data={
"dpbench.migrations": ["alembic.ini"],
"dpbench.configs": [
"*.toml",
"bench_info/*.toml",
"bench_info/polybench/*.toml",
"bench_info/polybench/stencils/*.toml",
"bench_info/polybench/datamining/*.toml",
"bench_info/polybench/linear-algebra/*.toml",
"bench_info/polybench/linear-algebra/kernels/*.toml",
"bench_info/polybench/linear-algebra/solvers/*.toml",
"bench_info/polybench/linear-algebra/blas/*.toml",
"bench_info/polybench/medley/*.toml",
"bench_info/npbench/*.toml",
"bench_info/rodinia/*.toml",
"framework_info/*.toml",
],
},
cmake_args=cmake_args,
)