[PATCH] eng: Add build system chapter

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 11 09:45:04 UTC 2019


Hello Chris,

thanks for having a look at it.

On 08/11/2019 23:48, Chris Johns wrote:[...]
> 3. Is the ${} expansion something you have implemented? It is a nice feature.
[...]

With standard Python the substitution itself is a one liner:

     def substitute(self, ctx, value):
         if isinstance(value, str):
             try:
                 return Template(value).substitute(ctx.env)
             except Exception as e:
                 ctx.fatal(
                     "In item '{}' substitution in '{}' failed: {}".format(
                         self.uid, value, e
                     )
                 )
         return value


-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list