[Scons-users] emitter create dependency cycle
Philipp Kraus
philipp.kraus at flashpixx.de
Wed Sep 4 02:38:03 EDT 2013
On 2013-09-04 05:07:02 +0000, Arvid Rosén said:
> Hi!
>
> 3 sep 2013 kl. 23:56 skrev Philipp Kraus <philipp.kraus at flashpixx.de>:
> On 2013-09-03 19:32:05 +0000, Arvid Rosén said:
>
> Yeah, this is tricky, and I would like to know how to handle stuff like
> this too in a good way!
>
> I have been facing similar problems on Mac OS when trying to write
> builders that operate on a bundle (which is a directory with a bunch of
> files).
>
> Wouldn't it be good to have a Node object that represents a directory
> as a single entity? That way you could write a builder that operates on
> the directory using a single action, and no need to have emitters to
> track all files in it. This would make it easy to copy and sign bundles
> etc. All these things tend to be difficult using Dir and File nodes.
>
> I'm thinking about a own Dir node, derivated from a Python.Value or an
> overloaded Filsystem.Node. Do you have any code excerpt, because I need
> some good ideas?
>
> That sounds like something I had in mind, but no, I have no code for
> this. Only ugly workarounds that rather bypass the whole problem.
I have tried to implementate this (I have do this before on my
URLDownload Builder with a Python.Value node).
I have tried to create a class like:
class DirNode(SCons.Node.FS.Dir) :
def get_contents(self) :
return "mytest"
and geht the error "AttributeError: 'FS' object has no attribute
'DirNode'". This is also correct, because my node is not in the FS
package, but I don't understand
this error, because my node is a FS.Dir node, so equal to the SCons Dir
node, except the get_contents method.
Any idea?
Thanks
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130904/f6e4d69f/attachment.htm
More information about the Scons-users
mailing list