Snapcraft and Numpy on Ubuntu Core

Hello,
finally I got my application snapped on Ubuntu 16.04 and 17.10 but now I try to snap it on Ubuntu Core (with my raspberry) and my python part (which depends on numpy) runs into following problem when building:

Running setup.py bdist_wheel for numpy ... error
Complete output from command /home/getty23/test/cavi-device-snap/parts/cavi-device-sdk/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-uQWew9/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpviHEPkpip-wheel-:
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
 libraries mkl_rt not found in ['/home/getty23/test/cavi-device-snap/parts/cavi-device-sdk/install/usr/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/arm-linux-gnueabihf']
 NOT AVAILABLE
 ...

my part looks like this:

parts:
  cavi-device-sdk:
    plugin: python
    python-version: python2
    source: ../cavi-device-sdk
    stage-packages:
     - libc6

I already tried to fix numpy to a certain version in the setup.py, I changed the part to something like this:

cavi-device-sdk:
  plugin: python
  python-version: python2
  source: ../cavi-device-sdk
  build-packages:
    - python-dev
    - python-numpy
  python-packages:
   - numpy==1.13.3
 stage-packages:
   - libc6

But nothing helped and I am pretty sure that this part was building before on Ubuntu Core (but it was a while ago when I executed it the last time).
Would be great to get some support from you.
Thanks

Does anyone has an idea what the problem might be over here? Thanks

Here is the actual problem from the log file (sorry that I did not add it from the beginning):

arm-linux-gnueabihf-gcc: numpy/core/src/multiarray/arrayobject.c
numpy/core/src/multiarray/arrayobject.c:1838:5: error: ‘array_methods’ undeclared here (not in a function)
   array_methods,                              /* tp_methods */
   ^
numpy/core/src/multiarray/arrayobject.c:1840:5: error: ‘array_getsetlist’ undeclared here (not in a function)
   array_getsetlist,                           /* tp_getset */
   ^
numpy/core/src/multiarray/arrayobject.c:1838:5: error: ‘array_methods’ undeclared here (not in a function)
   array_methods,                              /* tp_methods */
   ^
numpy/core/src/multiarray/arrayobject.c:1840:5: error: ‘array_getsetlist’ undeclared here (not in a function)
   array_getsetlist,                           /* tp_getset */

Would be great to get some support. Thanks

I found the answer to my problem. Seems that I used the wrong numpy version. With numpy 1.11.0 and the following stage packages it was working:

 - gcc
 - gfortran
 - python-dev
 - libc6
 - libblas3
 - liblapack3
 - libopenblas-dev
 - liblapack-dev
 - cython
2 Likes