forked from NateShoffner/PySnip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
30 lines (24 loc) · 782 Bytes
/
build.py
File metadata and controls
30 lines (24 loc) · 782 Bytes
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
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
ext_modules = []
names = [
'pyspades.vxl',
'pyspades.bytes',
'pyspades.packet',
'pyspades.contained',
'pyspades.common',
'pyspades.world',
'pyspades.loaders',
'pyspades.mapmaker'
]
for name in names:
extra = {'extra_compile_args' : ['-std=c++11']} if name in ['pyspades.vxl', 'pyspades.world', 'pyspades.mapmaker'] else {}
ext_modules.append(Extension(name, ['./%s.pyx' % name.replace('.', '/')],
language = 'c++', include_dirs=['./pyspades'], **extra))
setup(
name = 'pyspades extensions',
ext_modules = cythonize(ext_modules)
)