librelist archives

« back to archive

Preprocessing files with Bento

Preprocessing files with Bento

From:
Pierre Chanial
Date:
2013-02-01 @ 20:50
Hello,

I am wondering how to preprocess files with Bento.
By preprocessing, I mean simple replacements of string identifiers in files
(not necessarily Python files) by some values, such as Bento's $prefix or
'Path' variables, similar to the numpy's Extension mechanism. Currently
these files are specified by a DataFiles section in Bento.info.

Cheers,
Pierre

Re: [bento] Preprocessing files with Bento

From:
David Cournapeau
Date:
2013-02-03 @ 20:04
Hi Pierre,

On Fri, Feb 1, 2013 at 8:50 PM, Pierre Chanial <pierre.chanial@gmail.com> wrote:
> Hello,
>
> I am wondering how to preprocess files with Bento.
> By preprocessing, I mean simple replacements of string identifiers in files
> (not necessarily Python files) by some values, such as Bento's $prefix or
> 'Path' variables, similar to the numpy's Extension mechanism. Currently
> these files are specified by a DataFiles section in Bento.info.

There is no such mechanism, so you would need to implement it by
yourself in a hook file. One could imagine having a small library to
help for such tasks, though, as hinted by Ralf.

David

Re: [bento] Preprocessing files with Bento

From:
Ralf Gommers
Date:
2013-02-02 @ 12:54
On Fri, Feb 1, 2013 at 9:50 PM, Pierre Chanial <pierre.chanial@gmail.com>wrote:

> Hello,
>
> I am wondering how to preprocess files with Bento.
> By preprocessing, I mean simple replacements of string identifiers in
> files (not necessarily Python files) by some values, such as Bento's
> $prefix or 'Path' variables, similar to the numpy's Extension mechanism.
> Currently these files are specified by a DataFiles section in Bento.info.
>

I recently had the same question. I ended up with this:
https://github.com/numpy/numpy/pull/2943. It would be nice if Bento had a
standard Task to accomplish that for simple cases.


Ralf