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

David Cournapeau david at ar.media.kyoto-u.ac.jp
Fri Jan 9 03:00:36 EST 2009


Stéfan van der Walt wrote:
> 2009/1/9 David Cournapeau <david at 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