Issue :travis-ci fails for pypy code that imports numpy 1.16.0rc1


Import of numpy on travis CI fails for numpy-1.16.0rc1-py2.7-linux-x86_64.egg

    import numpy
  File "/home/travis/virtualenv/pypy2.7-5.8.0/site-packages/numpy-1.16.0rc1-py2.7-linux-x86_64.egg/numpy/", line 142, in <module>
    from . import core
  File "/home/travis/virtualenv/pypy2.7-5.8.0/site-packages/numpy-1.16.0rc1-py2.7-linux-x86_64.egg/numpy/core/", line 16, in <module>
    from . import multiarray
  File "/home/travis/virtualenv/pypy2.7-5.8.0/site-packages/numpy-1.16.0rc1-py2.7-linux-x86_64.egg/numpy/core/", line 44, in <module>
    arange.__module__ = 'numpy'
TypeError: readonly attribute

For example see:

Use a more recent PyPy; e.g., python: pypy2.7-6.0.

Understood. The above version of pypy is the default one on travis-ci.

You could try something like this to download the latest nightly

mkdir -p pypy3.5-latest
(cd pypy3.5-latest; tar --strip-components=1 -xf ../pypy.tar.bz2)
pypy3.5-latest/bin/pypy3 -mensurepip
pypy3.5-latest/bin/pypy3 -m pip install --upgrade pip setuptools
pypy3.5-latest/bin/pypy3 -m pip install --user cython==0.29.0 pytest pytz
pypy3.5-latest/bin/pypy3 -- -rsx --junitxml=junit/test-results.xml --durations 10