From 3105008fdac4bb97005c72e50002d7327e81e8dd Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Mon, 26 Jan 2026 22:44:05 +0100 Subject: 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 --- gnu/packages/sagemath.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm index 327434dd9df..b932b046cb1 100644 --- a/gnu/packages/sagemath.scm +++ b/gnu/packages/sagemath.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019, 2025 Andreas Enge +;;; Copyright © 2019, 2025, 2026 Andreas Enge ;;; Copyright © 2024, 2025 Vinicius Monego ;;; Copyright © 2025 Ricardo Wurmus ;;; @@ -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") -- cgit v1.3