-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
67 lines (53 loc) · 2 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
# -*- coding: utf-8 -*-
# Author: Wilson Estécio Marcílio Júnior <[email protected]>
#
# License: BSD 3 clause
from setuptools import setup, Extension, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext
from pybind11 import get_cmake_dir
import sys
__version__ = "0.1.6"
ext_modules = None
with open('README.md', 'r') as f:
long_description = f.read()
if sys.platform == 'win32':
print("Compiling for Windows")
ext_modules = [
Pybind11Extension("_cluster_shapley",
["src/cpp/cs.cpp", "src/cpp/cs_bind.cpp"],
language='c++',
extra_compile_args = [ '/openmp'],
extra_link_args = [ '/openmp'],
define_macros = [('VERSION_INFO', __version__)],
),
]
else:
print("Compiling for Linux")
ext_modules = [
Pybind11Extension("_cluster_shapley",
["src/cpp/cs.cpp", "src/cpp/cs_bind.cpp"],
language='c++',
# extra_compile_args = ['-O3', '-shared', '-std=c++11', '-fPIC', '-fopenmp', '-march=native', '-DINFO'],
# extra_link_args = ['-O3', '-shared', '-std=c++11', '-fPIC', '-fopenmp', '-march=native', '-DINFO'],
extra_compile_args = ['-O3', '-std=c++11', '-fPIC', '-fopenmp'],
extra_link_args = ['-O3', '-std=c++11', '-fPIC', '-fopenmp'],
define_macros = [('VERSION_INFO', __version__)],
),
]
setup(
name="cluster-shapley",
version=__version__,
author="Wilson E. Marcílio-Jr",
author_email="[email protected]",
url="https://github.com/wilsonjr/ClusterShapley",
description="Explaining dimensionality reduction using SHAP values",
long_description="",
ext_modules=ext_modules,
extras_require={"test": "pytest"},
# Currently, build_ext only provides an optional "highest supported C++
# level" feature, but in the future it may provide more features.
cmdclass={"build_ext": build_ext},
install_requires=['scipy', 'sklearn', 'numpy', 'shap==0.41.0', 'pybind11'],
packages=['dr_explainer'],
zip_safe=False,
)