-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
48 lines (43 loc) · 1.13 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
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
import numpy
# Get the numpy include directory.
numpy_include_dir = numpy.get_include()
# efficient mesh extraction (Occupancy networks: Learning 3d reconstruction in function space, CVPR 2019)
mise_module = Extension(
'leap.tools.libmise.mise',
sources=[
'leap/tools/libmise/mise.pyx'
],
)
# occupancy checks needed for training
libmesh_module = Extension(
'leap.tools.libmesh.triangle_hash',
sources=[
'leap/tools/libmesh/triangle_hash.pyx'
],
libraries=['m'], # Unix-like specific
include_dirs=[numpy_include_dir]
)
ext_modules = [
libmesh_module,
mise_module,
]
setup(
name='leap',
version='0.0.1',
ext_modules=cythonize(ext_modules),
cmdclass={
'build_ext': BuildExtension
},
url='https://neuralbodies.github.io/LEAP',
license='',
author='Marko Mihajlovic',
author_email='[email protected]',
description=''
)