On 18/05/16 19:35, Eli Stevens (Gmail) wrote:
I downloaded the prebuilt binary pypy-5.1.1-osx64, dropped it into my
homedir, and built a virtualenv using it. The files look like they
were built Apr. 30th, I installed May 11th. I don't think that I've
installed numpy-specific C libs for the cpython numpy I also have
installed, but this system is old enough that I might have. If that
becomes relevant, I can dig in more.

First I installed numpy by following the instructions here:
http://pypy.org/download.html#installing-numpy  IIRC, I just used the
virtualenv pip to do it.

Then when I started to notice the difference in behavior between
cpython and pypy, I ended up messing around a bit (wondering if the
slight version difference was important, etc.) and ended up going into
the pypy venv site-packages and doing rm -rf numpy* to get a clean
slate, then doing a git clone of the pypy/numpy repo and doing pypy
setup.py install, as directed here: https://bitbucket.org/pypy/numpy

Then I run this:

    pypy -c "import numpy; numpy.test('doesntexist')"

And get (among a lot of other noise):

======================================================================
ERROR: Failure: ImportError (No module named numpy.core.multiarray_tests)
----------------------------------------------------------------------
...

Commenting out those imports results in the datetime64 issue I gave
earlier. That's when I decided it was getting too hacky, and it made
sense to reach out and make sure that I was running the tests the
right way, etc.

Of course, if you'd like more detail on anything, please let me know.  :)

Thanks!
Eli

It seems you are doing everything correctly.
multiarray_tests comes from numpy/core/src/multiarray/multiarray.c.src which is compiled to a C-API module.
We skip building it as we have quite a way to go before we can support that level of C-API compatibility.
The issue with readonly flag attributes actually lies with micronumpy, in the pypy interpreter itself.
If you wish to work on this, you should add a test (in the pypy repo) to
pypy/module/micronumpy/test/test_flagsobj.py and continue from there.
Matti
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to