[Scons-users] SCons.Node.Python.Value on target_factory
Philipp Kraus
philipp.kraus at flashpixx.de
Sun Apr 7 19:13:43 EDT 2013
Am 08.04.2013 um 00:21 schrieb Bill Deegan:
> Are you trying to implement something like what the old SourceCode() builder was?
> http://www.scons.org/doc/production/HTML/scons-man.html
I think so, I have created a branch, which shows the Python.Value call
https://github.com/flashpixx/Storage/tree/Python.Value/Scons
The SConstruct runs first the "clone" builder, after that the pull, but the pull isn't working (the message isn't shown)
in the site_scons/site_tools/Repository.py the line 95 is modified, I have added the target_factory.
Is the implementation if my builder correct?
Thanks
Phil
>
> On Sun, Apr 7, 2013 at 3:19 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
> Seems like you should specify the target_factory as Dir, and the source_factory as a Value if the action is a git pull?
>
> Regardless, when trying to understand such logic, you're always better off to make a simple single file SConstruct and get it working the way you expect.
> Even make the action just an echo of source and target..
>
> Can you paste an example invocation of your GitPull builder?
>
> -Bill
>
>
> On Sun, Apr 7, 2013 at 2:30 PM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
> Hi Bill,
>
> I have added a Builder for Git & SVN support (builder source: https://github.com/flashpixx/Storage/blob/master/Scons/site_scons/site_tools/Repository.py and my example repo) and I add in the generate eg
>
> env["BUILDERS"]["GitPull"] = SCons.Builder.Builder( action = SCons.Action.Action("${REPOSITORY['GIT']['PULL']}"), source_factory = SCons.Node.FS.Dir, single_source = True, PRINT_CMD_LINE_FUNC = __GitPullMessage )
>
> If I add "target_factory = SCons.Node.Python.Value" I can call the builder with env.GitPull
> but the action is not run. If I remove the target_factory option or change it to Dir / File (all except Python.Value),
> the builder works well.
> If I set the source_factory to Python.Value and the target_factory to eg Dir, everything works fine.
>
> The code works at the moment fine, it is only a question to understand the different factories.
>
> Thanks
>
> Phil
>
>
>
> Am 07.04.2013 um 22:49 schrieb Bill Deegan:
>
>> Phil,
>>
>> So something like:
>>
>> env.Command(Value('blah'),'mysource.txt')
>>
>> ?
>> What is the source to your builder? has it changed?
>>
>> -Bill
>>
>>
>>
>> On Sun, Apr 7, 2013 at 12:51 PM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
>> Hello,
>>
>> I use on my builder for the target_factory a SCons.Node.Python.Value, because
>> the target is in my builder is not used by the action. On this
>> target_factory the action of the builder is not run. I have removed
>> the target_factory option of the builder and the builder runs.
>>
>> Why does the builder not run, if I set the target_factory to the Python.Value?
>>
>> (tested under Scons 2.2.0 & 2.3.0)
>>
>> Thx
>>
>> Phil
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130408/6f21c675/attachment.htm>
More information about the Scons-users
mailing list