summaryrefslogtreecommitdiff
path: root/doc/swig/test/setup.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2008-08-23 23:17:23 +0000
committerStefan van der Walt <stefan@sun.ac.za>2008-08-23 23:17:23 +0000
commit5c86844c34674e3d580ac2cd12ef171e18130b13 (patch)
tree2fdf1150706c07c7e193eb7483ce58a5074e5774 /doc/swig/test/setup.py
parent376d483d31c4c5427510cf3a8c69fc795aef63aa (diff)
downloadnumpy-5c86844c34674e3d580ac2cd12ef171e18130b13.tar.gz
Move documentation outside of source tree. Remove `doc` import from __init__.
Diffstat (limited to 'doc/swig/test/setup.py')
-rwxr-xr-xdoc/swig/test/setup.py66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/swig/test/setup.py b/doc/swig/test/setup.py
new file mode 100755
index 000000000..fadf8b5cd
--- /dev/null
+++ b/doc/swig/test/setup.py
@@ -0,0 +1,66 @@
+#! /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()
+
+# Array extension module
+_Array = Extension("_Array",
+ ["Array_wrap.cxx",
+ "Array1.cxx",
+ "Array2.cxx"],
+ include_dirs = [numpy_include],
+ )
+
+# Farray extension module
+_Farray = Extension("_Farray",
+ ["Farray_wrap.cxx",
+ "Farray.cxx"],
+ include_dirs = [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],
+ )
+
+_Fortran = Extension("_Fortran",
+ ["Fortran_wrap.cxx",
+ "Fortran.cxx"],
+ include_dirs = [numpy_include],
+ )
+
+# NumyTypemapTests setup
+setup(name = "NumpyTypemapTests",
+ description = "Functions that work on arrays",
+ author = "Bill Spotz",
+ py_modules = ["Array", "Farray", "Vector", "Matrix", "Tensor",
+ "Fortran"],
+ ext_modules = [_Array , _Farray , _Vector , _Matrix , _Tensor,
+ _Fortran]
+ )