Hi,

I think I found the root cause of the problem. sympy's setup.py
has the following line:

import sympy

it is the line triggering everything. I don't know if it calls the already
installed system sympy or the build copy (but I could find out).
The matter is it is reproducible by just opening a python2.6 shell
and typing "import sympy" and you will get the same message.
Try "import mpmath" and you will get the exact same error. This is 
because the problem comes from mpmath and in the case of sympy
the copy of mpmath that is shipped with it.

mpmath ships a file which will try to load sage: libintmath.py, it also
tries to load gmpy if it is available. I don't know if that gives rise to 
similar problems:

import math
from bisect import bisect

from settings import MODE, gmpy, sage, MP_BASE, MP_ONE, MP_ZERO

So we have to look in settings.py :

gmpy = None
sage = None

MODE = 'python'
MP_BASE = long

if 'MPMATH_NOGMPY' not in os.environ:
    try:
        import gmpy
        if gmpy.version() >= '1.03':
            MODE = 'gmpy'
            MP_BASE = gmpy.mpz
    except:
        pass

if 'MPMATH_NOSAGE' not in os.environ:
    try:
        import sage.all
        if hasattr(sage.all.Integer, "trailing_zero_bits"):
            sage = sage.all
            MODE = 'sage'
            MP_BASE = sage.Integer
    except:
        pass

-----------------------------
This is all a little bit convoluted mpmath is used by sage and now it looks 
like mpmath can use sage.

Anyway exporting MPMATH_NOSAGE=1 in the ebuild should solve that particular 
problem.

Francois 

Reply via email to