External cython packages broken

78 views
Skip to first unread message

Marc Mezzarobba

unread,
Aug 29, 2025, 4:52:26 AM (7 days ago) Aug 29
to sage-...@googlegroups.com
Hi,

It looks like Sage 10.8.beta0 broke the installation of external packages that include Cython modules. For example:

$ sage --pip install --no-build-isolation git+https://github.com/abelfunctions/abelfunctions
Collecting git+https://github.com/abelfunctions/abelfunctions
Cloning https://github.com/abelfunctions/abelfunctions to /tmp/pip-req-build-nm91g82x
Running command git clone --filter=blob:none --quiet https://github.com/abelfunctions/abelfunctions /tmp/pip-req-build-nm91g82x
Resolved https://github.com/abelfunctions/abelfunctions to commit 5ce22b8c56082d717a0f59b1aa81f0282919b4ac
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [601 lines of output]

Error compiling Cython file:
------------------------------------------------------------
...
from sage.structure.element cimport AlgebraElement, ModuleElement
^
------------------------------------------------------------

abelfunctions/puiseux_series_ring_element.pxd:1:0: 'sage/structure/element.pxd' not found

or

$ sage --pip install --no-build-isolation git+https://github.com/mkauers/ore_algebra.git
Collecting git+https://github.com/mkauers/ore_algebra.git
Cloning https://github.com/mkauers/ore_algebra.git to /tmp/pip-req-build-22lzwkmn
Running command git clone --filter=blob:none --quiet https://github.com/mkauers/ore_algebra.git /tmp/pip-req-build-22lzwkmn
Resolved https://github.com/mkauers/ore_algebra.git to commit 4f463b4f9b18f5c6f5ad2af0bc4378aeae83a5fa
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [1593 lines of output]

Error compiling Cython file:
------------------------------------------------------------
...
# Distributed under the terms of the GNU General Public License (GPL) either
# version 2, or (at your option) any later version
#
# http://www.gnu.org/licenses/

from sage.libs.arb.types cimport *
^
------------------------------------------------------------

src/ore_algebra/analytic/binary_splitting_arb.pyx:17:0: 'sage/libs/arb/types.pxd' not found

Both of the above commands work correctly with Sage 10.7.

--
Marc

Marc Mezzarobba

unread,
Aug 29, 2025, 4:58:58 AM (7 days ago) Aug 29
to sage-...@googlegroups.com
Marc Mezzarobba wrote:
> It looks like Sage 10.8.beta0 broke the installation of external
> packages that include Cython modules.

Update: I just noticed that 10.8.beta1 is out. The issue is still
present.

--
Marc

Dima Pasechnik

unread,
Aug 29, 2025, 8:29:04 PM (6 days ago) Aug 29
to sage-...@googlegroups.com
yes, it appears as if sage.env.sage_include_directories() got broken.
Not the least due to its test being too weak.
In a macOS setup I tried, I'm getting, as output,
['/Users/dima/software/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/_sagemath_editable_loader.py',
'/Users/dima/software/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/_core/include',
'/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13']

and it's obvious that these are not locations where one can hope to
find Sage's .pxd files
(from a Sage installation in ~/software/sage).
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/108rpno%24nfq%241%40ciao.gmane.io.

Dima Pasechnik

unread,
Aug 30, 2025, 12:51:56 AM (6 days ago) Aug 30
to sage-...@googlegroups.com
On Fri, Aug 29, 2025 at 6:47 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> yes, it appears as if sage.env.sage_include_directories() got broken.
> Not the least due to its test being too weak.
> In a macOS setup I tried, I'm getting, as output,
> ['/Users/dima/software/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/_sagemath_editable_loader.py',
> '/Users/dima/software/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/_core/include',
> '/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13']
>
> and it's obvious that these are not locations where one can hope to
> find Sage's .pxd files
> (from a Sage installation in ~/software/sage).

I've opened https://github.com/sagemath/sage/issues/40726 - where I also provide
a workaround (and a blueprint for a fix).
Reply all
Reply to author
Forward
0 new messages