How is `src/sage/libs/mpmath/ext_main.pyx` built and test

13 views
Skip to first unread message

Majorana Oedipus

unread,
4:01 AM (13 hours ago) 4:01 AM
to sage-support
I am totally confused. Apparently there is
`src/sage/libs/mpmath/ext_main.pyx`
and several other Cython files in the directory, yet they did not make
it to the
build?
In my distro's (Arch Linux) SageMath package,
```Python
from sage.libs.mpmath import ext_main```
gives an error:
```
ModuleNotFoundError: No module named 'sage.libs.mpmath.ext_main'
```
I tried building SageMath from source using
```Shell
pip install --no-build-isolation --editable .
```
and in the resulting build, the import raise a different error:
```
File sage/libs/mpmath/ext_main.pyx:43, in init sage.libs.mpmath.ext_main()
File
~/.conda/envs/sage-dev/lib/python3.12/site-packages/mpmath/__init__.py:10
7 from .ctx_iv import MPIntervalContext
9 fp = FPContext()
---> 10 mp = MPContext()
11 iv = MPIntervalContext()
13 fp._mp = mp
File sage/libs/mpmath/ext_main.pyx:408, in
sage.libs.mpmath.ext_main.Context.__cinit__()
NameError: name 'rationallib' is not defined
```
While `./sage -t src/sage/libs/mpmath/ext_main.pyx` pass all tests?
There are
plenty of `sage: from sage.libs.mpmath.ext_main import somthing` in the
docstrings, which confuses me even more.

Antonio Rojas

unread,
4:21 AM (13 hours ago) 4:21 AM
to sage-support
Arch Linux ships mpmath 1.4 and so those files are removed as per https://github.com/sagemath/sage/pull/40669. If this causes any practical issue, please comment on the merge request.

Since mpmth 1.4 support is still not merged, installing sagemath via pip on Arch requires that you first install mpmath 1.3 via pip too.

Reply all
Reply to author
Forward
0 new messages