[Numpy-discussion] [SciPy-user] Managing Python with NumPy and many external libraries on multiple Windows machines

David Cournapeau david at ar.media.kyoto-u.ac.jp
Wed Apr 29 01:46:20 EDT 2009


Stéfan van der Walt wrote:
> 2009/4/28 David Cournapeau <cournape at gmail.com>:
>   
>> the header file is not very reliable. More generally, I think we
>> should have a way to track C API and ABI relatively to the number
>> version, as well as automatically generate the related documentation.
>>     
>
> We can already do this: simply choose a convention for NPY_VERSION and
> NPY_FEATURE_VERSION so that they are related.
>   

By tracking, I meant more than just the actual number in the source
code, like something in the documentation. So that if someone wants to
know which function is present in which version of numpy, he can quickly
find it in the documentation. Doxygen has a version field for
documentation, I wonder whether we could use something like this for the
C code.

For making sure we don't forget to increase those numbers when
necessary, here are two possibilities:
    - always append NULL as the last item in PyArray_API, so that we can
easily get the size of the API, and detect mismatch (a mismatch
guarantees incompatibilities, but a match does not guarantee compatibility)
     - the API is mostly changed when we add functions to the API, that
is when either multiarray.txt or ufunc.txt is changed: we could track
the checksum of both multiarray.txt and ufunc.txt, and make a
relationship between the checksum and the C-API versions. Every time the
code generator, it would check the checksum against this list, and barf
in case of mismatch; this would remind us to update the version numbers
accordingly.

cheers,

David



More information about the NumPy-Discussion mailing list