[Scons-users] configuration file
    Jason Kenny 
    dragon512 at live.com
       
    Thu Jun  2 11:25:44 EDT 2016
    
    
  
Hi neal,
 
I am not sure exactly what you are doing, but Parts might be able to help. 
 
It has a notion of configurations. In this setup you can add flags, paths etc to the environment for a given component/parts you define based on some tool being used python, gcc cl, etc... 
 
You sound like you have a case like this:
 
Project-root
         Compa/
         Compb/
 
Where you want Compa to have a different environment setup from compb.  Or you have a case of wanting to build component A more than once with a different configuration.
 
Both cases are similar in Parts, as you would define your SConstruct and a part file for A and B. you would have something like this in SConstruct:
 
# example of build A twice with a different config
Part(“compa/compa.part”, CONFIG=”release”)
Part(“compa/compa.part”, CONFIG=”debug”)
 
# example of build A and B with a different config
Part(“compa/compa.part”, CONFIG=”release”)
Part(“compb/compb.part”, CONFIG=”debug”)
 
Ideally you also want your own configuration, so you can add your own to part-site/configuration/<your config>. 
 
# example of build A and B with a different custom config
Part(“compa/compa.part”, CONFIG=”mypython”)
Part(“compb/compb.part”, CONFIG=”myenvpython”)
 
However I read this again and I think you just want to be able to build A once. IF you don’t want the one pass build different configuration options presented above, but a simpler build A once with a configuration I want. You would just define something like after adding custom config files to a parts-site directory
 
#Sconstruct file
Part(“compa/compa.part”, CONFIG=”python”)
 
And run a command like such as:
 
scons --cfg=myenvpython all
to build everything with myenvpython configuration
scons --cfg=mypython all
to build everything with mypython configuration
 
either way Parts does allow you to define you own configuration ( based on some toolchain FYI) and control what configuration you use for what Component or via the command line or a parts.cfg file what is the default configuration to use.
 
I should have documentation for this online at the tigris site: http://parts.tigris.org/doc/PartsUserGuide.pdf  ( and it is check in the source) I trying to start updating it to a non-word format and clean it up. if you have questions about this I am happy to answer.
 
Hope this is helpful for you!
 
Jason
 
 
 
From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Jason Kenny
Sent: Thursday, June 2, 2016 9:37 AM
To: dl9obn at darc.de; 'SCons users mailing list' <scons-users at scons.org>
Subject: Re: [Scons-users] configuration file
 
The latest code is at https://bitbucket.org/sconsparts/parts FYI.
 
Jason
 
From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Dirk Baechle
Sent: Thursday, June 2, 2016 7:52 AM
To: SCons users mailing list <scons-users at scons.org <mailto:scons-users at scons.org> >
Subject: Re: [Scons-users] configuration file
 
Hi Neal,
this sounds pretty much like a job for ¨Parts¨ to me... http://parts.tigris.org .
Regards,
Dirk
Am 2. Juni 2016 13:45:04 MESZ, schrieb Neal Becker <ndbecker2 at gmail.com <mailto:ndbecker2 at gmail.com> >:
Bill Deegan wrote:
 Neal,
 
 You might want to look at the manpage for site_init.py <http://init.py>  (and site_scons
 directory)
 http://scons.org/doc/production/HTML/scons-man.html
 
 This is a file which is evaluated into SCons by default when SCons is
 launched.
 SCons will check several different locations for the file.
 See snippet from manpage below.
 I think this should fit your usage exactly?
 
Perhaps, but I need this to be per-project (per-directory).
For example, when building project A in my default system python 
environment, I use 1 setup.
When building project A using anaconda python in a virtualenv, I use a 2nd 
setup.
Right now, I use 2 different site.cfg files to setup the paths.
  _____  
Scons-users mailing list
Scons-users at scons.org <mailto:Scons-users at scons.org> 
https://pairlist4.pair.net/mailman/listinfo/scons-users
-- 
Sent from my Android with K-9 Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160602/90279b03/attachment-0001.html>
    
    
More information about the Scons-users
mailing list