diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-05-04 19:28:09 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-05-04 21:42:09 +0200 |
commit | 3d431abd7f92efca208d92d597d5c8393ecc388d (patch) | |
tree | 12e234f58b90c6622bac00fdcda0f750a6c86c5f /bscript | |
parent | 004ce2780fc8527baff4ee220028626cd6eda6fe (diff) | |
download | numpy-3d431abd7f92efca208d92d597d5c8393ecc388d.tar.gz |
BLD: fix Bento build after umath_linalg move from core to linalg module.
Diffstat (limited to 'bscript')
-rw-r--r-- | bscript | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -18,6 +18,12 @@ import subprocess import __builtin__ __builtin__.__NUMPY_SETUP__ = True +import waflib + +from numpy.distutils.conv_template \ + import \ + process_str as process_c_str + from bento.commands import hooks from bento.utils.utils \ import \ @@ -81,3 +87,25 @@ def pre_sdist(context): @hooks.options def options(global_context): blas_lapack.add_options(global_context) + + +class CTemplateTask(waflib.Task.Task): + color = 'BLUE' + before = ['c'] + def run(self): + s = self.inputs[0] + cnt = s.read() + writestr = process_c_str(cnt) + o = self.outputs[0] + o.write(writestr) + +@waflib.TaskGen.extension(".src") +def c_template(self, node): + outs = [] + outs.append(node.change_ext("")) + + tsk = self.create_task('CTemplateTask', node, outs) + if "c" in self.features: + self.source.append(outs[0]) + + |