[Scons-users] download builder - tips

Philipp Kraus philipp.kraus at flashpixx.de
Fri Apr 5 20:41:22 EDT 2013


Hello,

thanks to Dirk and Bill for some nice email. I would like to replace my "dirty hacked Scons script" to a little more general code structure and would like to send them into the Scons community.
I'm primary writing C/C++ code and uses Scons on OSX, Linux, Windows (MSVC & MinGW) for the building process.

Often there exists on my C/C++ project the problem, that the project uses a lot of different libraries eg LAPack, Boost, Dune-FEM .... and these libs must be compiled for the project, so I use Scons for
this building process most with a lot of env.Command code and some hacked builders. With a little time, I have forked out my first "hacked builder" to a more "Scons-Way-Builder".
It is a little short builder, which downloads any URL data into a file. I have pushed the builder in my repo ( https://github.com/flashpixx/Storage/blob/master/Scons/site_scons/site_tools/URLDownload.py )
and a test Sconstruct under https://github.com/flashpixx/Storage/blob/master/Scons/SConstruct
This builder replaces the target on default with the filename of the URL, the env setting URLDOWNLOAD_USEURLFILENAME (true | false) can be enabled / disabled this target replacing

The next forked builders will be an Unpacking builder with flexible tool use (eg 7-Zip under Windows, tar / gzip / bzip under *nix) and a external builder for compiling extracted sources with cmake, MSVC ...

I hope for some helpfull tips for the URLDownload builder and some idea for improvement

Thanks

Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130406/50503b95/attachment.html>


More information about the Scons-users mailing list