[Scons-users] Dependencie with Sconscripts and builder's environment
Vasily
just.one.man at yandex.ru
Tue Oct 11 16:16:28 EDT 2016
I was under impression that one can tell an Action one creates to include
certain environment variables (COMMENT in your case) into Action's
signature.
I cannot remember exact details from the top of my head, but I recommend
reading SCons manual to find this ability. I cannot do it for you as I'm
tapping it from my phone.
Thanks,
Vasily
11 окт. 2016 г. 22:22 пользователь "Albert Arquer" <albert.arquer at gmail.com>
написал:
> Python value node? Please could you elaborate on how that would work?
>
> Isn't there any other way this can be done? Could I redefine the
> get_presig method for the builder? Or maybe use different kinds of builers?
> (As you mentioned mine is a python Action, maybe there are others?)
>
> We thought we could dump the whole env into a file when registering a
> target and then pass that file as a builder source, but we are doing this
> for code redability and evaluation speed, and I am not sure if that would
> accomplish neither...
>
> El dimarts, 11 d’octubre de 2016, Dirk Bächle <tshortik at gmx.de> va
> escriure:
>
>> Hi Albert,
>>
>> and thanks for the intriguing example. :)
>>
>> On 11.10.2016 18:22, Albert Arquer wrote:
>>
>>> Hi Bill,
>>>
>>> yes sure, I though it would be much harder to do that because I thought
>>> it would have to do with some weird feature we are using,
>>> however I was able to replicate the issue with a very tiny peace of code:
>>>
>>> ...
>>>
>>>
>>> So is this a known limitation? Are we doing something wrong?
>>>
>>>
>> You're doing nothing wrong, it's in fact a limitation of the core
>> sources. When using a Python method as an Action, as you do in your
>> example, SCons will use the body of the function (its contents as retrieved
>> via FunctionAction::get_presig, see src/engine/SCons/Action.py) to trigger
>> an update...and it doesn't change, unfortunately. :(
>>
>> A workaround might be to create a Python value node from the $COMMENT
>> variable, and set a direct dependency to the final target. Somewhat
>> cumbersome, I know...
>>
>> Best regards,
>>
>> Dirk
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161011/39cc817d/attachment.html>
More information about the Scons-users
mailing list