Debian Codegraph @

tools/swig/test/setup.py

raw
1 #!/usr/bin/env python3
2 from distutils.core import Extension, setup
3
4 import numpy
5
6 # Obtain the numpy include directory.
7 numpy_include = numpy.get_include()
8
9 # Array extension module
10 _Array = Extension("_Array",
11 ["Array_wrap.cxx",
12 "Array1.cxx",
13 "Array2.cxx",
14 "ArrayZ.cxx"],
15 include_dirs=[numpy_include],
16 )
17
18 # Farray extension module
19 _Farray = Extension("_Farray",
20 ["Farray_wrap.cxx",
21 "Farray.cxx"],
22 include_dirs=[numpy_include],
23 )
24
25 # _Vector extension module
26 _Vector = Extension("_Vector",
27 ["Vector_wrap.cxx",
28 "Vector.cxx"],
29 include_dirs=[numpy_include],
30 )
31
32 # _Matrix extension module
33 _Matrix = Extension("_Matrix",
34 ["Matrix_wrap.cxx",
35 "Matrix.cxx"],
36 include_dirs=[numpy_include],
37 )
38
39 # _Tensor extension module
40 _Tensor = Extension("_Tensor",
41 ["Tensor_wrap.cxx",
42 "Tensor.cxx"],
43 include_dirs=[numpy_include],
44 )
45
46 _Fortran = Extension("_Fortran",
47 ["Fortran_wrap.cxx",
48 "Fortran.cxx"],
49 include_dirs=[numpy_include],
50 )
51
52 _Flat = Extension("_Flat",
53 ["Flat_wrap.cxx",
54 "Flat.cxx"],
55 include_dirs=[numpy_include],
56 )
57
58 # NumyTypemapTests setup
59 setup(name="NumpyTypemapTests",
60 description="Functions that work on arrays",
61 author="Bill Spotz",
62 py_modules=["Array", "Farray", "Vector", "Matrix", "Tensor",
63 "Fortran", "Flat"],
64 ext_modules=[_Array, _Farray, _Vector, _Matrix, _Tensor,
65 _Fortran, _Flat]
66 )