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
|
#! /usr/bin/env python
# System imports
from distutils.core import *
from distutils import sysconfig
# Third-party modules - we depend on numpy for everything
import numpy
# Obtain the numpy include directory. This logic works across numpy versions.
try:
numpy_include = numpy.get_include()
except AttributeError:
numpy_include = numpy.get_numpy_include()
# _Vector extension module
_Vector = Extension("_Vector",
["Vector_wrap.cxx",
"vector.cxx"],
include_dirs = [numpy_include],
)
# _Matrix extension module
_Matrix = Extension("_Matrix",
["Matrix_wrap.cxx",
"matrix.cxx"],
include_dirs = [numpy_include],
)
# _Tensor extension module
_Tensor = Extension("_Tensor",
["Tensor_wrap.cxx",
"tensor.cxx"],
include_dirs = [numpy_include],
)
# NumyTypemapTests setup
setup(name = "NumpyTypemapTests",
description = "Functions that work on arrays",
author = "Bill Spotz",
py_modules = ["Vector", "Matrix", "Tensor"],
ext_modules = [_Vector , _Matrix , _Tensor ]
)
|