File: SConscript

package info (click to toggle)
python-scipy 0.7.2%2Bdfsg1-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 28,572 kB
  • ctags: 36,183
  • sloc: cpp: 216,880; fortran: 76,016; python: 71,833; ansic: 62,118; makefile: 243; sh: 17
file content (56 lines) | stat: -rw-r--r-- 1,566 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
# Last Change: Sat May 03 02:00 PM 2008 J
# vim:syntax=python

from os.path import join as pjoin, splitext

from numscons import GetNumpyEnvironment
from numscons import CheckF77LAPACK

from numscons import write_info

env = GetNumpyEnvironment(ARGUMENTS)
env.Tool('f2py')
#if os.name == 'nt':
#    # NT needs the pythonlib to run any code importing Python.h, including
#    # simple code using only typedef and so on, so we need it for configuration
#    # checks
#    env.AppendUnique(LIBPATH = [get_pythonlib_dir()])

#=======================
# Starting Configuration
#=======================
config = env.NumpyConfigure(custom_tests = {'CheckLAPACK' : CheckF77LAPACK})

#-----------------
# Checking Lapack
#-----------------
st = config.CheckLAPACK()
if not st:
    raise RuntimeError("no lapack found, necessary for isolve module")

config.Finish()
write_info(env)

#--------------------
# iterative methods
#--------------------
methods = ['BiCGREVCOM.f.src',
           'BiCGSTABREVCOM.f.src',
           'CGREVCOM.f.src',
           'CGSREVCOM.f.src',
#               'ChebyREVCOM.f.src',
           'GMRESREVCOM.f.src',
#               'JacobiREVCOM.f.src',
           'QMRREVCOM.f.src',
#               'SORREVCOM.f.src'
           ]
Util = ['STOPTEST2.f.src','getbreak.f.src']
raw_sources = methods + Util + ['_iterative.pyf.src']

sources = []
for method in raw_sources:
    target = splitext(method)[0]
    res = env.FromFTemplate(target, pjoin('iterative', method))
    sources.append(res[0])

env.NumpyPythonExtension('_iterative', source = sources)