[Scons-users] emitter create dependency cycle

Philipp Kraus philipp.kraus at tu-clausthal.de
Tue Sep 3 07:48:13 EDT 2013


Hi,

I have written a builder with an emitter. Input is a SCons.Node.FS.Dir object and out SCons.Node.FS.File objects, but the input directory exists, so only files will be append to the directory.
The emitter creates the file list and returns only the files (the directories are removed first). In this step I get a dependency cycle between the input source dir and the returning target files.
If I replace in the emitter the source with a pseudo name, everything works fine, but I can not work with a dir object.

The emitter shows something like this
def __emitter(target, source, env) :
// do something with source and create target list

return target, source

This creates the cycle, on changing to
return target, str(source[0])+"#pseudo"
the cycle does not exists anymore, but the source object is not a Dir object in my builder call, so I need to remove the "#pseudo" string, but in this case I can not create a new Dir object,
eg SCons.Node.FS.Dir( str(source[0]).replace("#pseudo", "") ) does not work.

I need a solution to rename the single source object and transfer it to the builder call and use it in the builder than a Dir object

Thanks

Phil


More information about the Scons-users mailing list