File: bscript

package info (click to toggle)
python-scipy 0.10.1%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 42,232 kB
  • sloc: cpp: 224,773; ansic: 103,496; python: 85,210; fortran: 79,130; makefile: 272; sh: 43
file content (32 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
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
import sys

from bento.commands import hooks

@hooks.pre_build
def pre_build(context):
    default_builder = context.default_builder

    def builder(extension):
        # FIXME: detect this properly
        if sys.platform == "darwin":
            use_c_calling = True
        else:
            use_c_calling = False
        sources = extension.sources[:]
        if use_c_calling:
            sources.append("ARPACK/FWRAPPERS/veclib_cabi_f.f")
            sources.append("ARPACK/FWRAPPERS/veclib_cabi_c.c")
        else:
            sources.append("ARPACK/FWRAPPERS/dummy.f")
        return default_builder(extension,
                               features="c fc cstlib pyext bento",
                               source=sources,
                               # Hack to make use of claoadable flags for static archive
                               use="cshlib")
    context.register_compiled_library_builder("arpack", builder)

    def builder(extension):
        return default_builder(extension,
                               features="c fc pyext cshlib f2py bento",
                               use="arpack FLAPACK CLIB")
    context.register_builder("_arpack", builder)