[Numpy-discussion] access ndarray in C++
David Cournapeau
david@ar.media.kyoto-u.ac...
Wed Apr 23 04:15:00 CDT 2008
Matthieu Brucher wrote:
>
> Having a good python extension builder is also more difficult than I
> first expected, too (you can't retrieve options for MS compilers from
> distutils, for example and I would like to support building with and
> without distutils' help).
>
>
> What are these options that must be retrieved?
the compiler, the compiler flags, the linker, the linker flags, the
location of Python.h, etc...
> With a simple extension builder, we didn't encountered any bug
> although we have a fair number of extensions.
Building a helloworld like extension or say numpy.core is kind of the
same from a build point of view. The problem really is to work in many
different configurations (for example supporting building python
extensions for a different python than the one running scons), on
different platforms.
Waf (a project which started as a fork of scons and is now a totally
different project for all purpose) has a python tool, and it is 300
lines of code:
http://code.google.com/p/waf/source/browse/trunk/wafadmin/Tools/python.py
And it has more support for this kind of things than scons. My current
work for a python extension for scons is ~ 200 lines, not including unit
tests.
cheers,
David
More information about the Numpy-discussion
mailing list