[Numpy-discussion] [numscons] Would having two mandatory scons script per package be acceptable ?

David Cournapeau david@ar.media.kyoto-u.ac...
Thu Jun 12 00:08:32 CDT 2008


Robert Kern wrote:
>
> Can you give me a longer story? What are the three lines? Why are they
> necessary in a separate, boilerplate file?

Sure: scons builds everything from the sources in the source directory, 
and build everything in the build directory.  By default, both 
directories are the same as the directory where the scons script is.

Now, this is of course unacceptable to use with distutils, and scons has 
this notion of build directory to change this: depending on where the 
scons script is called in the tree, I change the source and build 
directories accordingly. But for this to work, you have to change how to 
refer to source and targets in builders (scons objects to build things 
like object code and libraries). Again, unacceptable, so I did remove 
most of those in the scons scripts using severals 'tricks' in numscons. 
But the more I did those tricks, the more I realized it was fragile, and 
could break in obscure cases.

The recommended way to do it in scons is to use a second scons script: 
http://www.scons.org/wiki/UnderstandingBuildDir. The 'problem' is also 
linked to the fact that instead of building everything with one scons 
project, I have one scons project per package (because that's how 
distutils worked, in particular, and for other reasons I can develop if 
you want). I asked about doing the same thing as scons does without two 
files, but this seems difficult (I was told it is 'magic').

http://scons.tigris.org/servlets/ReadMsg?list=users&msgNo=13642

cheers,

David






More information about the Numpy-discussion mailing list