I have a Python program, whose workflow over a set of files that could be nicely expressed using "build" dependencies with Scons as follows:
SConstruct
file that describes the dependencies and rules to build targets.
scons
on the SConstruct
file.Is it possible to eliminate the creation of SConstruct
file and calling scons
on it, and do that directly from my Python program? After all, SConstruct
is a Python program, just that it's called by scons
in a special fashion.
Possible, yes.
Recommended, very much not so. It was never designed with that type of usage and so doing so will be very complicated, and it is not a supported usage by the SCons maintainers.
See Mats comment above for some of the details why.
I'd keep using the flow you've got working now. You won't simplify anything by embedding SCons.