[Scons-users] Repositories and rstr/rfile

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Tue May 13 09:30:33 EDT 2014


Someone has decided that it'd be a good thing to have a file in a repository (i.e. scons -Y <repo>) which gets copied unchanged into the build directory at the same location. Thus he has code of the general form:

Import('*')

for f in Glob('some.config.*'):
Depends('test.pcv', Command(f, f.rfile(), Copy('$TARGET', '$SOURCE')))

Except this doesn't work, because the 2nd time you do a build, f and f.rfile() are now the same thing. As far as I can tell this is only related to repositories.

Choices seem to be:
1) use os.path.join(path-to-repo, f) instead of f.rfile() or f.abspath or f.prettymuchanything()
2) Tell him to do something different, like not use the same names. This sort of breaks down as he claims something similar works if he's not using a repository.
3) I'm missing some easy way of finding out the actual source of an item in a repository

Thanks

TT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140513/768599ca/attachment.html


More information about the Scons-users mailing list