forked from Jasonkks/PTTR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (34 loc) · 1.15 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
from __future__ import division, absolute_import, with_statement, print_function
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
try:
import builtins
except:
import __builtin__ as builtins
builtins.__POINTNET2_SETUP__ = True
import pointnet2
_ext_src_root = "pointnet2/_ext-src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
"{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))
requirements = ["etw_pytorch_utils==1.1.1", "h5py", "pprint", "enum34", "future"]
setup(
name="pointnet2",
version=pointnet2.__version__,
author="Erik Wijmans",
packages=find_packages(),
install_requires=requirements,
ext_modules=[
CUDAExtension(
name="pointnet2._ext",
sources=_ext_sources,
extra_compile_args={
"cxx": ["-O2", "-I{}".format("{}/include".format(_ext_src_root))],
"nvcc": ["-O2", "-I{}".format("{}/include".format(_ext_src_root))],
},
)
],
cmdclass={"build_ext": BuildExtension},
)