-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
32 lines (23 loc) · 938 Bytes
/
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
#!/usr/bin/env python3
# encoding: utf-8
from distutils.core import setup, Extension
import sysconfig
EXTRA_COMPILE_ARGS = sysconfig.get_config_var('CFLAGS').split()
EXTRA_COMPILE_ARGS += ["-std=c99"]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.misc_util import get_info
# Necessary for the half-float d-type.
info = get_info('npymath')
config = Configuration('',
parent_package,
top_path)
config.add_extension('mapper_c_utils',
['src/mapper_c_utils/mapper_c_utils.c'],
extra_info=info,
language='c99',
extra_compile_args=EXTRA_COMPILE_ARGS)
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
setup(configuration=configuration)