1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-06-08 05:28:56 +02:00

gnu: sage: Build with meson instead of setuptools.

* gnu/packages/sagemath.scm (sage)[native-inputs]: Replace
python-setuptools by meson-python.  Add python-sphinx.
[arguments]<#:phases>{patch-source}: Patch out checks for maxima from ecl.
It is not found by meson, but will be found by sage due to our patching
of src/sage/env.py.
[setup]: Do not chdir into src, so that the higher level pyproject.toml
is used for the build with meson.

Change-Id: Id3f8fbc4e9097f31a5e56ee8a49d2d2772620cf5
This commit is contained in:
Andreas Enge
2026-01-26 22:44:05 +01:00
parent 1cd8b5ef4d
commit 3105008fda
+11 -5
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2025 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2019, 2025, 2026 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2024, 2025 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
;;;
@@ -35,6 +35,7 @@
#:use-module (gnu packages base)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages boost)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
@@ -51,7 +52,8 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-xyz))
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sphinx))
(define-public brial
(package
@@ -377,12 +379,13 @@ database.")
(build-system pyproject-build-system)
(native-inputs
(list autoconf automake m4 pkg-config ; for ./bootstrap
meson-python
python-cython
python-cysignals
python-memory-allocator
python-pkgconfig
python-jinja2
python-setuptools
python-sphinx
python-wheel))
(propagated-inputs
(list ;; required to make the sage script start
@@ -471,6 +474,10 @@ database.")
(sed #$(this-package-input "sed"))
(graphs #$(this-package-input "graphs"))
(polytopes-db #$(this-package-input "polytopes-db")))
;; Patch out meson checks for things that will work since we
;; patch env.py below.
(substitute* "src/sage/libs/meson.build"
(("maxima_check.returncode\\(\\) == 0") "true"))
(substitute* (find-files "build/bin")
(("sage-bootstrap-python") "python"))
(substitute* "src/sage/env.py"
@@ -519,8 +526,7 @@ database.")
(lambda _
(setenv "SAGE_NUM_THREADS"
(number->string (parallel-job-count)))
(invoke "./bootstrap")
(chdir "src")))
(invoke "./bootstrap")))
(delete 'sanity-check)))) ; does not reflect reality
(home-page "https://www.sagemath.org/")
(synopsis "SageMath computer algebra system")