Re: [Scons-dev] Calling PseudoBuilder from an emitter function from a Builder with OverrideEnvironment looses overrides

2013-10-21 Thread Dirk Bächle

Hi Andreas,

On 21.10.2013 11:54, andreas.a...@de.transport.bombardier.com wrote:


Hi all,

first of all, thanks for providing such a useful tool as scons.

I've found a small glitch in Scons 2.1.0 (as part of Ubuntu 12.04 
LTS). I've got an emitter function installed for one of my builders. 
 This builder is called with keyword arguments so that an 
OverrideEnviroment is used to execute it.  When the emitter function 
is called the OverrideEnvironment is presented to it in the env 
parameter.  But if I call a PseudoBuilder (i.e. a MethodWrapper 
instance) from there, the PseudoBuilder itsself is called with the 
original environment and the OverrideEnvironment is no longer 
available to it.  I guess, a possible fix would be to forward the 
keyword arguments used to call the builder to the emitter function so 
that these keyword arguments could be used to call the PseudoBuilder.




as a first thought on this: I wouldn't expect this to work at all, 
because it shouldn't be necessary to call any kind of Builder from an 
Emitter.
Can you possibly tell us a bit more about where this setup comes from, 
or why you need to do it like this?


Thanks a lot in advance and best regards,

Dirk

___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


Re: [Scons-dev] Calling PseudoBuilder from an emitter function from a Builder with OverrideEnvironment looses overrides

2013-10-21 Thread andreas . ames
Hi Dirk,

scons-dev-boun...@scons.org schrieb am 21.10.2013 12:40:27:

 as a first thought on this: I wouldn't expect this to work at all, 
 because it shouldn't be necessary to call any kind of Builder from an 
Emitter.
 Can you possibly tell us a bit more about where this setup comes 
 from, or why you need to do it like this?

it's well possible that I'm abusing the PseudoBuilder concept here.  We've 
got a convention here that our own environment variables are all prefixed 
with a common short string to avoid clashes with names predefined by 
scons.  So we have created a PseudoBuilder which takes the unadorned 
variable name and adds the common prefix to look up the variable in the 
environment.  Thus I used this PseudoBuilder to lookup a variable within 
the emitter because I didn't know about the No Builders in emitters 
rule.

The workaround was trivial and I will transform my lookup PseudoBuilder 
into a normal Python function which seems more adequate (and efficient) 
anyway.


Thanks for the clarification,

aa
  
Please consider the environment before you print / Merci de penser à 
l'environnement avant d'imprimer / Bitte denken Sie an die Umwelt bevor 
Sie drucken 

Bombardier Transportation GmbH 
Vorsitzender des Aufsichtsrats / Chairman of Supervisory Board: Prof. Dr. 
Wilhelm Bender 
Geschäftsführung / Executive Board: Michael Clausecker 
(Vorsitzender/Chairman), Dr. Susanne Kortendick, David Barry, Matthias 
Keller 
Sitz der Gesellschaft / Principal Office: Berlin 
Registergericht / Registration Court: Amtsgericht Charlottenburg, HRB 
64838 


___
 

This e-mail communication (and any attachment/s) may contain confidential 
or privileged information and is intended only for the individual(s) or 
entity named above and to others who have been specifically authorized to 
receive it. If you are not the intended recipient, please do not read, 
copy, use or disclose the contents of this communication to others. Please 
notify the sender that you have received this e-mail in error by reply 
e-mail, and delete the e-mail subsequently. Please note that in order to 
protect the security of our information systems an AntiSPAM solution is in 
use and will browse through incoming emails. 
Thank you. 
_
 


Ce message (ainsi que le(s) fichier(s)), transmis par courriel, peut 
contenir des renseignements confidentiels ou protégés et est destiné à 
l?usage exclusif du destinataire ci-dessus. Toute autre personne est, par 
les présentes, avisée qu?il est strictement interdit de le diffuser, le 
distribuer ou le reproduire. Si vous l?avez reçu par inadvertance, 
veuillez nous en aviser et détruire ce message. Veuillez prendre note 
qu'une solution antipollupostage (AntiSPAM) est utilisée afin d'assurer la 
sécurité de nos systèmes d'information et qu'elle furètera les courriels 
entrants.
Merci. 
_
 


___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev