[Scons-users] Is it possible to use Copy Action Functions outside of SConscript?
Bill Deegan
bill at baddogconsulting.com
Fri Mar 16 10:30:25 EDT 2018
So you want to use the Copy() action inside a builder?
-Bill
On Fri, Mar 16, 2018 at 9:34 AM, Pierre-Luc Boily <pierreluc.boily at gmail.com
> wrote:
> My SConscript contains the following code :
>
> Execute(Copy(os.path.join(env['LOCALROOT'], str(env.Dir('.').path),
> 'MaxSim.idl'), 'MaxSim.idl'))
>
> In order to make my SConscript cleaner, I wanted to move this line into a
> pseudo-builder, in an utility file.
>
> Then, when I am calling this line :
> Execute(Copy(os.path.join(env['LOCALROOT'], variantDirOutput,
> str(idlFile)),
> str(idlFile)))
>
> from my utility function, I have error:
> NameError: global name 'Execute' is not defined
>
> I understood that because I am outside of the SConscript context, Execute
> is
> not recognized anymore. I then added my env, like that :
> env.Execute(Copy(os.path.join(env['LOCALROOT'], variantDirOutput,
> str(idlFile)), str(idlFile)))
>
> Now, Execute is recognized, but Copy is not. If I try to add env to the
> Copy function (env.Copy()), I now have this error : warning: The env.Copy()
> method is deprecated;
>
> I understand the env.Copy() is depracated, but is it possible to use Copy
> action outside the SConscript the same way I did for env.Execute?
>
> Thx
>
>
>
>
>
>
>
>
> --
> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180316/ab9f182d/attachment.html>
More information about the Scons-users
mailing list