[pypy-dev] pypy with sympy

Ondrej Certik ondrej at certik.cz
Wed Sep 19 14:22:38 CEST 2007


Hi Armin,

> That's obviously because the python path of pypy doesn't allow it to
> find the 'py' module.  You don't have this problem if you don't use the
> globally-installed py.test, but the one from a PyPy checkout instead:
>
>     pypy .../pypy-dist/py/bin/py.test args...
>
> or equivalently
>
>     pypy .../pypy-dist/pypy/test_all.py args...

I tried:

ondra at fuji:~/sympy$ PYTHONPATH="/usr/lib/python2.4/site-packages/"
pypy `which py.test`

and got many errors, but I think all are the same:


   def __init__(self, targetfd, tmpfile=None):
       self.targetfd = targetfd
       if tmpfile is None:
>           tmpfile = self.maketmpfile()

[/usr/lib/python2.4/site-packages/py/io/fdcapture.py:12]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

   def maketmpfile(self):
       """ create a temporary file
           """
E       f = os.tmpfile()
>       AttributeError: 'module' object has no attribute 'tmpfile'

[/usr/lib/python2.4/site-packages/py/io/fdcapture.py:44]
_______________________________________________________________________________
================= tests finished: 21 failed in 11.93 seconds ==================


So, I think it's the problem in py lib in debian, that it doesn't work
with pypy?

Then I tried as you suggested now:

in /tmp:

$ svn co http://codespeak.net/svn/pypy/dist pypy-dist

in ~/sympy:

$ pypy /tmp/pypy-dist/py/bin/py.test

But the exact same problem as above:


    def maketmpfile(self):
        """ create a temporary file
            """
E       f = os.tmpfile()
>       AttributeError: 'module' object has no attribute 'tmpfile'

[/tmp/pypy-dist/py/io/fdcapture.py:44]
_______________________________________________________________________________
================== tests finished: 21 failed in 1.80 seconds ==================

then I tried:

$ pypy /tmp/pypy-dist/pypy/test_all.py

and again the same problem.

Maybe just the pypy in Debian is old? In this case maybe it's time for
a new release. :) If you tell me what to fix, I'll send a patch to the
debian maintainer to fix it in Debian.

Ondrej



More information about the Pypy-dev mailing list