-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (27 loc) · 834 Bytes
/
setup.py
File metadata and controls
30 lines (27 loc) · 834 Bytes
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
from setuptools import setup, Extension
import numpy as np
import sysconfig
# Remove -Wstrict-prototypes from default CFLAGS
cfg_vars = sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if isinstance(value, str) and "-Wstrict-prototypes" in value:
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
ext_modules = [
Extension(
"numpy_reduceat_ext.argmin",
sources=["src/numpy_reduceat_ext/argmin.cpp"],
include_dirs=[np.get_include()],
language="c++",
extra_compile_args=["-std=c++17",]
),
Extension(
"numpy_reduceat_ext.argmax",
sources=["src/numpy_reduceat_ext/argmax.cpp"],
include_dirs=[np.get_include()],
language="c++",
extra_compile_args=["-std=c++17",]
),
]
setup(
ext_modules=ext_modules,
)