[Numpy-discussion] Bitting the bullet: using scons to build extensions inside distutils ?

Travis E. Oliphant oliphant@enthought....
Wed Sep 19 21:26:29 CDT 2007


David Cournapeau wrote:
> Hi,
>
>    Starting thinking over the whole distutils thing, I was thinking
> what people would think about using scons inside distutils to build
> extension. The more I think about it, the more I think than distutils
> not being maintained, and numpy/scipy building needs being much more
> complicated (at least different) than usual python extension, trying
> to circumvent distutils problems is an ever ending fight. Scons, being
> developped as a Make replacement, can do all we would like to be able
> to do with distutils, including:
>   
Pearu is correct that numpy.distutils has quite a few features that are 
not easily replaced and so there will be some skepticism initially in 
doing things differently. 

However, I don't think there will be much resistance to distributing 
scons along with numpy so that it may be used to supplement what is done 
in numpy.distutils as long as it is integrated into the numpy.distutils 
chain some-how.

In short, I'm all for integrating scons with numpy if possible as long 
as we don't just toss what numpy.distutils has done.

-Travis






>  - building shared or static libraries, with dependencies (knows how
> to do it on many platforms).
>  - can build each object file independently (e.g different compiler options)
>  - is much much friendlier than distutils.
>  - can handle external tools like swig, etc...
>  - have basic facility to look for libraries (ala autoconf. By basic,
> I mean it is far from being as complete as autoconf, but is much
> better than distutils).
>
> Scons has also the following advantages:
>  - written in python, can be distributed with numpy (by this, I mean
> AFAIK, license-wise, it is ok, and its size is not big): does not add
> additional dependency.
>  - can be called within distutils quite easily.
>
> That is, I don't see big disadvantage to use it with distutils. It
> would give use some wanted features out of the box (building
> extensions based on ctypes, much friendlier way to customize building
> option).
>
> There are some things I am not sure about :
>  - how to build python extension with it: this is of course mandatory
>  - what is required for a "bi-directional" communication with
> distutils: for this to work, distutils needs to be aware of what scons
> builds (for things like bdist to work, for example).
>
> There is no question this will require some work. But anyway, my
> feeling is there is a need to improve the distutils thing, and I feel
> like this may be an easier path than patching over distutils
> defficiencies. I know scons quite a bit, and am willing to develop at
> least a prototype to see the feasibility of the whole thing.
>
> But before starting, I would like to know whether other find the idea
> attractive, dumb, is a waste of time, etc...
>
> cheers,
>
> David
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>   



More information about the Numpy-discussion mailing list