[SciPy-dev] build system for scikit

David Cournapeau cournape@gmail....
Wed Jan 13 00:40:51 CST 2010


On Wed, Jan 13, 2010 at 1:43 PM, Nathaniel Smith <njs@pobox.com> wrote:
> So I've had some reports of problems with the scikits.sparse build
> system; I'm sure the general thrust will be familiar to many people
> here:
>  -- Even on Linux, different distributions put the CHOLMOD headers in
> different places (argh wft people)

Yes, that's annoying, OTOH, dumping a whole bunch of headers in
/usr/include is not scalable either.

>  -- Apparently numpy headers are not always placed in the Python
> include path? This seems broken to me, but okay...

This should not matter if you use the function to get numpy headers
from numpy.distutils,misc_util (get_numpy_include_headers).

>  -- In principle, it might be nice to be able to build just some of
> the scikit, e.g. if the person has the right libraries installed for
> scikits.sparse.cholmod but not scikits.sparse.umfpack.

This sounds like a good idea but it is almost always wrong in my
opinion, because you introduce more possible different configurations.
It increases more than decreases the distribution burden in my
experience.

>
> I know that Python building is completely broken in many ways, but
> there must be some kind of standard solutions (or at least standard
> hacks!) for these.

The only way that works if you care about being cross platform is
doing the autotools way: check for features instead of versions. So
for example, for CHOLMOD headers, you would test into different paths
until you found the one you want by compiling some small code
snippets. numpy.distutils can help you for that, and you can find a
extensive (but complicated) example in numpy/core/setup.py.

There is no general solution to your problem with python - autotools
and cmake are the best changes ATM, but interfacing distutils with
them is a big PITA,

cheers,

David


More information about the SciPy-Dev mailing list