[Scons-users] Repositories and rstr/rfile
Dirk Bächle
tshortik at gmx.de
Tue May 13 12:41:55 EDT 2014
Tom,
On 13.05.2014 15:30, Tom Tanner (BLOOMBERG/ LONDON) wrote:
> 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
>
please have a look at the MAN page, section "Variable Substitution". The
".rsrcpath" attribute/method might be what you're looking for.
Regards,
Dirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140513/bfa942a5/attachment.htm
More information about the Scons-users
mailing list