[Scons-users] How to import the env through which was env.SConscript( called

Zarko Berberski (Aditi Staffing LLC) v-zaberb at microsoft.com
Tue Jun 13 14:31:33 EDT 2017


Disregard the last one  - a typo was involved. Works now, thanks

From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Dirk Bächle
Sent: Tuesday, June 13, 2017 03:30
To: scons-users at scons.org
Subject: Re: [Scons-users] How to import the env through which was env.SConscript( called


Hi Zarko,

On 13.06.2017 06:02, Zarko Berberski (Aditi Staffing LLC) via Scons-users wrote:
I do a clone and call Sconcript with that clone, but that connection seems to be lost
>             SConsEnvironment.SConscript in SConscript line 541        --- still has self (which is env)
               _SConscript in SConscript line 250                                         --- env connection lost

I can't import by name since identical scripts needs to build in 2 folders (which may become -  variant_dir) => they shouldn't know which env to import - they should work with the one that's given to them.


please check out the example

  https://bitbucket.org/dirkbaechle/scons_talks/src/pyconde_2013/examples/exvar<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fdirkbaechle%2Fscons_talks%2Fsrc%2Fpyconde_2013%2Fexamples%2Fexvar&data=02%7C01%7Cv-zaberb%40microsoft.com%7C9ee3375f30aa4580d6ad08d4b247eca9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636329469370820209&sdata=%2F1G9zhoziEVSFlkXk6xGzzcoRBJspIhFWNpP7Fs0WyU%3D&reserved=0>

from the main "SCons talks" repo https://bitbucket.org/dirkbaechle/scons_talks<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fdirkbaechle%2Fscons_talks&data=02%7C01%7Cv-zaberb%40microsoft.com%7C9ee3375f30aa4580d6ad08d4b247eca9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636329469370820209&sdata=ShKEDLLOVlTh5HEuhiK%2FZ3mYnCKSWnyr76gh6vn%2FBuo%3D&reserved=0> . It shows how to use the "export" keyword for SConscript, which is the canonical way of doing what you're trying to accomplish.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170613/a3d7defe/attachment-0001.html>


More information about the Scons-users mailing list