forked from mmolero/pypoisson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
43 lines (33 loc) · 1.04 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
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
sources = ["pypoisson.pyx"]
path = "PoissonRecon_v6_13/src/"
files = [os.path.join(path,x) for x in os.listdir(path) if x.endswith(".cpp")]
sources += files
if sys.platform.startswith('linux') or sys.platform == 'darwin':
macros = [('__linux__', '1')]
else:
macros = [('__linux__', '0')]
exts = [Extension("pypoisson", sources,
language="c++",
define_macros=macros,
extra_compile_args = ["-w","-fopenmp"],
extra_link_args=["-fopenmp"]
)]
setup(
name='pypoisson',
version='0.10',
description='Poisson Surface Reconstruction Python Binding',
author='Miguel Molero-Armenta',
author_email='[email protected]',
url='https://github.com/mmolero/pypoisson',
cmdclass = {'build_ext': build_ext},
ext_modules = exts, include_dirs = [numpy.get_include()]
)
"""
python setup.py build_ext --inplace --compiler=mingw32 -DMS_WIN64
"""