[Scons-users] Have cache ignore some env variables

Dirk Bächle tshortik at gmx.de
Fri Feb 10 12:47:47 EST 2017


Hi Gilles,


On 10.02.2017 12:58, Gilles CARRY wrote:
> Hello,
>
> I would like Scons cache system ignore a defined set of env variables
> that cause spurious rebuild. A typical one is "http_proxy" embedding
> user/password strings.
>
> Is there a way to do this?

what exactly do you mean by "cache system"? In the following, I assume 
that you don't want the "change detection" mechanism to kick in for some 
of your targets...

The command line that you specify in the Action of your Builder gets 
"substituted" twice, while replacing all defined environment variables. 
Once for the actual shell command that is executed to build the target, 
and once for computing the "signature" version of this very command line.
For the latter, you can cut out portions of the actual command by 
enclosing them in "$( ... $)". For an example you can have a look at the 
testcase "test/long-lines/signature.py"...

Hope this helps.

Best regards,

Dirk



More information about the Scons-users mailing list