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 (27 lines) | stat: -rw-r--r-- 924 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
import sys

from bento.commands import hooks

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

    def builder(extension):
        source = extension.sources[:]
        if sys.platform == "darwin":
            source.pop(source.index("fblaswrap.f.src"))
            source.append("fblaswrap_veclib_c.c.src")
        return default_builder(extension,
                               features="c fc pyext bento cshlib f2py",
                               source=source,
                               use="FBLAS CLIB")
    context.register_builder("fblas", builder)

    def builder(extension):
        kw = {}
        if context.waf_context.env.HAS_CBLAS:
            kw["use"] = "CBLAS"
        return default_builder(extension,
                               features="c fc pyext bento cshlib f2py",
                               **kw)
    context.register_builder("cblas", builder)