[Scons-users] cleaning and surprises

Bill Deegan bill at baddogconsulting.com
Fri Sep 21 16:52:12 EDT 2018


Common problems:
1 - Trying to force SCons order of execution rather than specifying
dependencies (which is the proper usage of any build tool IMHO)
2 - After realizing SConscripts are python.. doing too much python and
using SConscripts as general scripting for your build.  Move that logic out
into standalone scripts and run via builders or Command.  Not popen. Not
system... etc.  The added bonus is that now you can easily test that logic,
which should always be done if it's non-trivial ..
3 - Not reading the docs.. including the manpage when trying to figure out
how to do something.
4 - Thinking SCons should do things a certain way and operating as if that
was true, when the initial presumption was wrong.. (back to #3 is the usual
cause for this)
5 - Reaching to far into SCons when there are simpler, documented, and
supported ways for doing things.

These are mostly broad generalities, but I think cover most of the issues
I've seen working with SCons for more than 10 years..

Maybe worthy of a page and/or blog post..

-Bill
On Fri, Sep 21, 2018 at 4:01 PM Mats Wichmann <mats at wichmann.us> wrote:

> On 09/21/2018 01:14 PM, Bill Deegan wrote:
> > Mats,
> >
> > If your SConscripts are doing a lot of miscellaneous python logic which
> > create those files and/or use Execute(), then that an issue with your
> build
> > setup.
> > If SCons is doing that, I'd be quite surprised with the exception of any
> > configure context files.
>
> okay, so let me clarify further.
>
> I know some of what my project does wrong - like one of the scripts that
> does do configure stuff being called repeatedly from different places
> instead of saving the information once and reusing it.  Yes, some of it
> is "just doing things in Python" as we've discussed elsewhere.  I can
> even fix some of it fairly cheaply, if I can ever get people to review
> the script changes (certainly not scons' problem).  There's not actually
> much calling of Execute.
>
> The question was more from the scons viewpoint: it seems like it's hard
> for people to discover the best practices, or alternatively, the worst
> practices. It seems like the folks who set this project up found a lot
> of suboptimal alleys to drive down. We seem not to be alone in that.
>
>
> _______________________________________________
> 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/20180921/52584b31/attachment-0001.html>


More information about the Scons-users mailing list