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

Matthieu Brucher matthieu.brucher@gmail....
Thu Jun 12 01:00:23 CDT 2008


2008/6/12 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
>
> 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.

Hi,

I don't understand your issues. We build everything in a variant dir
(what superseds a build dir in SCons 0.98), and we don't have troubles
indicating where are the sources and where are the targets as SCons
makes hard links between every source file and the build dir. Perhaps
I didn't understand exactly what you need, but it seems that just
calling the sub SConstruct scripts with :

env.SConscript( 'numpy/SConstruct',
   variant_dir = "$BUILDROOT",
                   )

should be enough so that you don't have to do something more with the BUILDROOT.

Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


More information about the Numpy-discussion mailing list