[Scons-users] Newbie questions

Bill Deegan bill at baddogconsulting.com
Sun Apr 23 02:39:32 EDT 2017


Can you pastebin the generated SConstruct and a sample(s) of SConscripts?
-Bill

On Sat, Apr 22, 2017 at 4:28 AM, <syost at triad.rr.com> wrote:

> Thanks Bill,
>
> Not near the laptop right now but Python 2.7 I believe installs with
> Ubuntu 16.04 which I am running.   I know it is not python 3.x because you
> have to type "python3" to run it.
>
> The underlying packages have nothing in terms of SCons artifacts - just to
> the top repository level.   I then added an SConscript to a single package
> as a guinea pig while I wrote a builder for a database precompilation
> step.   This never was read.   Here is the directory structure:
>
> myrepo   S*.py* files and SConstruct and SConscript (as generated by
> SConsolidator) are here.
> ------com
> ----------company
> -----------------ss
> -------------------functionalarea1
> ----------------------------------program11    (trying to add SConscript
> here for special pre-compile steps)
> ----------------------------------program.1N
> -------------------functionalarea2
> ----------------------------------program21
> ----------------------------------program.2N
> .....and so on.......
>
>
> If my PWD is "myrepo" and I type "scons -k" I actually get lots of
> successful package builds through the tree (or packages fail for
> predictable and understandable reasons). In this scenario program11
> compiles like any other but fails to include my special SConscript
> steps(and print statements prove it is never read).   Also, if I type scons
> -k com/company/ss/functionalarea1/program11 it will build fine too - but
> once again it builds without including my SConscript
>
> If I change my PWD to "program11", add a SConstruct, and then type "scons
> -k" my SConscript is properly read.   But of course, then I would have to
> build separately for several hundred packages since most will have special
> linking, special compiler flags, special DB steps, or post steps(ie perms),
> install directives, etc.  Not ideal and not what I was hoping for.
>
>
> Bottom line is the SConstruct generated by SConsolidator at the top
> "myrepo" directory seems (again - not a python expert) to include the
> necessary logic to walk the subdirs and call SConscript() for each
> SConscript() it finds but they actually seem to be ignored.  So I figured I
> am doing something wrong and hoped you folks could help.
>
> Thanks in advance!!
>
>
> ---- Bill Deegan <bill at baddogconsulting.com> wrote:
> > Spencer,
> >
> > Greetings and welcome!
> >
> > So the underlying packages already had a SCons based build system?
> > Or did you generate one for each package and then are trying to wrap them
> > with a SConstruct on top?
> >
> > Also what platform? Which version of python? Which version of SCons?
> >
> >
> > -Bill
> >
> > On Fri, Apr 21, 2017 at 1:22 PM, Spencer Yost <syost at triad.rr.com>
> wrote:
> >
> > > I am setting up a new development environment for work, and I am
> seriously
> > > looking at SCons as a replacement for our Frankenstein build system
> that we
> > > currently have. I like what I see so far but I'm having some trouble
> > > understanding the underlying architecture.
> > >
> > > Note1:  I have been experimenting quite a bit, and I have read the
> users
> > > guide and man pages
> > >
> > > Note 2:  I'm an experienced C and C++ developer  but I've never touched
> > > Python  before.
> > >
> > > Note 3:  Our code base has approximately 10K-15K files, found in
> several
> > > hundred packages in a hierarchical reverse domain organization.  This
> is
> > > set up in one git repository.
> > >
> > > So I installed Scons on my Ubuntu laptop and SCons builds a lot of
> > > packages out of box quite nicely.
> > >
> > > But some files and packages need to be treated specially before they
> can
> > > be built.   The Sconstruct  file (originally generated by
> SConsolidator in
> > > eclipse) appears like scons will look for sconscript files  in each
> > > individual package, but it doesn't.  Any SConscript file I place in an
> > > individual package for extra processing, does not appear to be read.
> > >
> > > The only way I seem to be able to build a package with an SConscript
> file
> > > is to also create an SConstruct file, and build using that package as
> my
> > > current base directory.
> > >
> > >
> > > Am I mistaken? Should I not be able to include a separate SConscript
> file
> > > in each package for the individual needs of the individual package yet
> > > initiate the build from the top of the hierarchy?
> > >
> > > Thanks in advance!
> > >
> > > PS:  Same thing happens if I try to build from Eclipse with
> SConsolidator.
> > >
> > > Spencer Yost
> > > _______________________________________________
> > > 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/20170422/382e4faf/attachment.html>


More information about the Scons-users mailing list