mpmath-0.17 does not work with gmpy2, because sqrtrem() was renamed to isqrt_rem() in gmpy2. There is a patch in the upstream repository for mpmath (revision 1235), but no release yet. Please either patch mpmath-0.17, or depend on dev-python/gmpy:0. Reproducible: Always Steps to Reproduce: 1. import mpmath Actual Results: >>> import mpmath Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/mpmath/__init__.py", line 5, in <module> from .ctx_fp import FPContext File "/usr/lib64/python2.7/site-packages/mpmath/ctx_fp.py", line 1, in <module> from .ctx_base import StandardBaseContext File "/usr/lib64/python2.7/site-packages/mpmath/ctx_base.py", line 3, in <module> from .libmp.backend import xrange File "/usr/lib64/python2.7/site-packages/mpmath/libmp/__init__.py", line 1, in <module> from .libmpf import (prec_to_dps, dps_to_prec, repr_dps, File "/usr/lib64/python2.7/site-packages/mpmath/libmp/libmpf.py", line 20, in <module> from .libintmath import (giant_steps, File "/usr/lib64/python2.7/site-packages/mpmath/libmp/libintmath.py", line 302, in <module> sqrtrem = gmpy.sqrtrem AttributeError: 'module' object has no attribute 'sqrtrem' Expected Results: Import successfully!
Could you please point us to the patch? I tried mpmath with both SLOT 0 and 2 of gmpy installed and it failed. Only if I removed SLOT 2 it worked.
(In reply to Justin Lecher from comment #1) > Could you please point us to the patch? http://code.google.com/p/mpmath/source/detail?r=1235 I am not sure where to download a patch. If you want me to, I can download the svn repository and create one.
+*mpmath-0.17-r1 (18 Jul 2013) + + 18 Jul 2013; Justin Lecher <jlec@gentoo.org> +mpmath-0.17-r1.ebuild, + +files/mpmath-0.17-gmpy2.patch: + Backport compatibility for gmpy-2, #477098 +