[Scons-users] extending build environments (the OO-way)
Julius Ziegler
ziegler at atlatec.de
Tue Sep 19 05:20:53 EDT 2017
Dear all,
I am trying to extend what an environment does by inheritance.
Here is an example of what I try to achive. Expected result is that
whenever I schedule build of a "Program" with a MyEnv, a message gets
printed to stdout:
class MyEnv( Environment ):
def Program( self, *args, **kwargs ):
print "REGISTERED PROGRAM TARGET", args[0]
super().Program( *args, **kwargs )
...but this code seems to do nothing. It looks like the original
Environment overloads the class attribute access or something like this.
I am not a hardcore python programmer and it is really hard for me to
figure out what is going on.
Is there a best practice to achieve something similar?
Thanks!
Julius
More information about the Scons-users
mailing list