-
Notifications
You must be signed in to change notification settings - Fork 4
/
conv_occ_setup.py
47 lines (37 loc) · 1.01 KB
/
conv_occ_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
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension
import numpy
### CONV OCC SETUP ###
# Get the numpy include directory.
numpy_include_dir = numpy.get_include()
# Extensions
# pykdtree (kd tree)
pykdtree = Extension(
'src/ndf_robot.utils.libkdtree.pykdtree.kdtree',
sources=[
'src/ndf_robot/utils/libkdtree/pykdtree/kdtree.c',
'src/ndf_robot/utils/libkdtree/pykdtree/_kdtree_core.c'
],
language='c',
extra_compile_args=['-std=c99', '-O3', '-fopenmp'],
extra_link_args=['-lgomp'],
include_dirs=[numpy_include_dir]
)
# Gather all extension modules
ext_modules = [
pykdtree,
]
setup(
ext_modules=cythonize(ext_modules),
# cmdclass={
# 'build_ext': BuildExtension
# }
cmdclass={
'build_ext': BuildExtension.with_options(use_ninja=False)
}
)