[Scons-users] SCons.Node.Python.Value on target_factory
Bill Deegan
bill at baddogconsulting.com
Sun Apr 7 18:19:42 EDT 2013
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130407/00dae566/attachment.html>
More information about the Scons-users
mailing list