[Scons-users] Custom Builders / Command / Execute

Pierre-Luc Boily pierreluc.boily at gmail.com
Mon Oct 31 21:43:24 EDT 2016


Hello,

I am playing with a custom builder (Builders That Execute Python Functions)
that I want to make better.

Our first iteration was using subprocess /call /to execute a batch file (a
batch file that was compiling grammars).  I realized that using python
subprocess /call /is kind of evil because it is not using scons environment.

Then, I decided to change my python function to use scons /Command /instead
(Still inside the custom builder).  Then again, I got plenty of problems and
I was quite confused between target/source given to my actual custom builder
and target/source given to scons /Command/.  It was not working at all. 
/Command /was not even called or I got errors with target

Finally, after all this, I found scons /Execute/.  I decided to give a try
so now, my custom builder uses /Execute /to actually execute external call. 
It worked pretty well.

Questions
1 - Does that make sense to use Command inside a custom builder?
2 - Is it appropriate to use Execute inside my custom builder?
3 - Do you agree that using python subprocess call might be bad?



--
View this message in context: http://scons.1086193.n5.nabble.com/Custom-Builders-Command-Execute-tp40687.html
Sent from the Users mailing list archive at Nabble.com.


More information about the Scons-users mailing list