Closed bmerry closed 4 years ago
This bit of the numpy docs seems relevant: https://docs.scipy.org/doc/numpy/reference/c-api.array.html?highlight=import_array#checking-the-api-version
If you want to supported many different numpy versions with one extension binary, you have to build your extension with the lowest NPY_FEATURE_VERSION as possible.
It looks like NPY_FEATURE_VERSION (aka NPY_API_VERSION) was bumped in 1.16.0, so it's expected that wheels built against it won't work against older versions of numpy.
With python-casacore 3.1.1 installed from a binary wheel and numpy 1.15.4 on Ubuntu 18.04 x86_64, I get the following error when trying to load a table (note: the error only happens when trying to open the table, not on import):
Upgrading to numpy 1.16.0 or above fixes it. I'm not sure if this is a source-level dependency on numpy or an ABI thing. Possibly building the wheel against an older numpy would improve compatibility (or possibly it will just break newer versions of numpy).