[Numpy-discussion] Replacement for numpy.distutils.config.try_run

David Cournapeau david@ar.media.kyoto-u.ac...
Fri Jan 9 02:00:36 CST 2009


Stéfan van der Walt wrote:
> 2009/1/9 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
>   
>> It happened that in that particular case where it is used in numpy, I
>> found a way around it, but I would like to get rid of it completely at
>> some point.
>>     
>
> What do you suggest as workarounds?
>
>   

What about not using tests which need to run on the target platform :)

It is not always easy, but in numpy cases, it is simple, at least
principle (numscons build does not run any test code, for example):
try_run is used to check whether some preprocessor defined are available
(see numpy/random and numpy/core), which is not necessary. The autobook
specifically mentions that code which need to run on target platforms
should be avoided, since it breaks cross-compilation; with python
distutils, it exactly breaks in those cases.

cheers,

David


More information about the Numpy-discussion mailing list