Switch modularized sagelib's build systems from setuptools to meson-python / ninja
mkoeppe opened this issue · 7 comments
(from #32874 comment:27)
SciPy has switched to meson-python / ninja (see #34081).
See for example https://github.com/scipy/scipy/blob/main/scipy/linalg/meson.build; this replaces older infrastructure like https://github.com/scipy/scipy/blob/main/tools/cythonize.py
Cython recently added the --depfile switch
- cython/cython#4949 (
cython --depfile)
This finally enables build systems to do their own dependency tracking (caching dependencies in depfiles) instead of passing all source files to Cython - where it takes a good chunk of the time for a trivial ./sage -b (#32874 comment:27).
What is needed is to make use of cython --depfile in meson:
- mesonbuild/meson#9049 (Cython dep handling)
Then we can switch from setuptools to meson-python. We would continue to use our own package/module discovery code (sage_setup.find).
In this ticket, we change the build systems of pkgs/sagemath-* (including pkgs/sagemath-standard) to meson-python. Editable builds will continue to use setuptools for a monolithic build via src/setup.py. (meson-python as of 0.11.x does not support PEP 660 editable wheels - mesonbuild/meson-python#47)
Depends on #33577
Depends on #34081
Depends on #34855
Depends on #34897
Component: build
Issue created by migration from https://trac.sagemath.org/ticket/34630
good idea.
Description changed:
---
+++
@@ -13,3 +13,6 @@
Then we can switch from setuptools to meson-python. We would continue to use our own package/module discovery code (`sage_setup.find`).
+In this ticket, we change the build systems of `pkgs/sagemath-*` (including `pkgs/sagemath-standard`) to meson-python. Editable builds will continue to use setuptools for a monolithic build via `src/setup.py`. (meson-python as of 0.11.x does not support PEP 660 editable wheels - https://github.com/mesonbuild/meson-python/issues/47)
+
+