[Scons-users] interrupted or failed build action handling
daggs
daggs at gmx.com
Wed Apr 29 12:15:36 EDT 2020
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.
More information about the Scons-users
mailing list