-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·46 lines (36 loc) · 1.36 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
#!/usr/bin/python3
"""
setup.py file for np_asm.c
Note that since this is a numpy extension
we use numpy.distutils instead of
distutils from the python standard library.
Calling
$python setup.py build_ext --inplace
will build the extension library in the current file.
Calling
$python3 setup.py build
will build a file that looks like ./build/lib*, where
lib* is a file that begins with lib. The library will
be in this file and end with a C library extension,
such as .so
Calling
$python setup.py install
will install the module in your site-packages file.
See the distutils section of
"Extending and Embedding the Python Interpreter"
at docs.python.org and the documentation
on numpy.distutils for more information.
"""
def configuration(parent_package="", top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.misc_util import get_info
from numpy.distutils.log import set_verbosity
# necessary for the half-float d-type.
info = get_info("npymath")
config = Configuration("np_asm_directory", parent_package, top_path)
config.add_extension("np_asm", ["np_asm.c"], extra_info=info)
set_verbosity(5, force=True)
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
setup(configuration=configuration)