-
Notifications
You must be signed in to change notification settings - Fork 77
/
setup.py
27 lines (24 loc) · 1.1 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
# setup file to compile C++ library
from setuptools import setup
import torch, os
from torch.utils.cpp_extension import CppExtension, BuildExtension
this_dir = os.path.dirname(os.path.realpath(__file__))
include_dir = this_dir + '/topologylayer/functional/persistence/'
extra = {'cxx': ['-std=c++14']}
setup(name='topologylayer',
packages=['topologylayer', 'topologylayer.functional',
'topologylayer.nn', 'topologylayer.util'],
ext_modules=[
CppExtension('topologylayer.functional.persistence',
['topologylayer/functional/persistence/pybind.cpp',
'topologylayer/functional/persistence/cohom.cpp',
'topologylayer/functional/persistence/hom.cpp',
'topologylayer/functional/persistence/complex.cpp',
'topologylayer/functional/persistence/cocycle.cpp'],
include_dirs=[include_dir],
extra_compile_args=extra['cxx']
)
],
cmdclass={'build_ext': BuildExtension},
zip_safe=False
)