[Scons-users] interrupted or failed build action handling

Bill Deegan bill at baddogconsulting.com
Wed Apr 29 13:38:44 EDT 2020


Dagg,

You need to build a target? Or you need to run a shell command? regardless
of what happens during the build.
Those are two different requests, so just trying to clarify.

-Bill

On Wed, Apr 29, 2020 at 9:15 AM daggs <daggs at gmx.com> wrote:

> Greetings Mats,
>
> > Sent: Wednesday, April 29, 2020 at 6:10 PM
> > From: "Mats Wichmann" <mats at wichmann.us>
> > To: scons-users at scons.org
> > Subject: Re: [Scons-users] interrupted or failed build action handling
> >
> > On 4/29/20 6:19 AM, daggs wrote:
> > > Greetings,
> > >
> > > I have a scons build script that I want to adjust with pre start and
> pre end actions, as I see it, it is quite simple, e.g.
> > > adding new target named prep and set it as dep of the first target I
> have today.
> > > the same goes for the end part, e.g. add a new target named end and
> set the current last target as it's dep.
> > > but here is my problem, I need to run target end no matter how the
> script ends, e.g. even if I get compilation failure, target failure or even
> user interruption I need target end to be executed.
> > >
> > > I've seen this: https://scons.org/doc/2.0.1/HTML/scons-user/x2045.html
> which I think can help me with compilation or target failure but I'm not
> sure it will with user interruption.
> > > I know I can use the python signal handling but I'm not sure how scons
> will behave.
> > >
> > > is there a standard way in scons to act on user interruptions? if no,
> will using python signal has any bad affect on scons's behavior?
> >
> > Does this help?
> >
> > https://scons.org/doc/3.1.2/HTML/scons-man.html#f-GetBuildFailures
> >
> > an atexit function should be able to catch user interruptions as well.
> >
>
> the link I've provided above is an old explanation of this same func.
> I tried the atexit func in a normal python script and it didn't caught the
> user interruptions, maybe I did it wrong, I'll try to search around.
>
> Thanks,
>
> Dagg.
> _______________________________________________
> 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/20200429/a07f2002/attachment.html>


More information about the Scons-users mailing list