andreas pushed a commit to branch wip-sage
in repository guix.

commit fd1a29446755e28de4f1f6440f4664b0aace504a
Author: Andreas Enge <[email protected]>
AuthorDate: Thu Feb 13 10:22:17 2025 +0100

    SAGE: TEST
    
    Change-Id: Ic3dd22baf90d453f30a11b12382dc1605d988b06
---
 gnu/packages/sagemath.scm | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 5ebe003f90..2f01be5588 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -36,6 +36,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -52,9 +53,7 @@
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages readline))
-
+  #:use-module (gnu packages python-xyz))
 
 (define-public brial
   (package
@@ -518,11 +517,15 @@ Handbook of Combinatorial Designs, 2ed.
       (list ;; required to make the sage script start
             python-ipython
             python-ipywidgets
-            python-traitlets))
+            python-traitlets
+            ;; required for the Jupyter notebook
+            python-jupyter-client
+            python-notebook))
     (inputs
       (list boost
             brial
             cliquer
+            coreutils
             ecl
             eclib
             edge-addition-planarity-suite
@@ -561,6 +564,7 @@ Handbook of Combinatorial Designs, 2ed.
             python-numpy
             ;ratpoints
             rw
+            sed
             singular
             symmetrica
             ;zn-poly
@@ -588,8 +592,17 @@ Handbook of Combinatorial Designs, 2ed.
                                 "/binary-ecl/maxima.fas\""))
                 (("\"Singular\"")
                  (string-append "\"" #$singular "/bin/Singular\""))
-              )
-              ))
+                ;; definition of SAGE_VENV, which ends up in kernel.json
+                (("os.path.abspath\\(sys.prefix\\)")
+                 (string-append "\"" #$output "\"")))
+              (substitute* "src/sage/interfaces/gp.py"
+                (("command=f\"gp")
+                 (string-append "command=f\"" #$pari-gp "/bin/gp")))
+              (substitute* "src/bin/sage"
+                (("mkdir")
+                 (string-append #$coreutils "/bin/mkdir"))
+                ((" sed ")
+                 (string-append " " #$sed " ")))))
           (add-before 'build 'setup
             (lambda _
               (setenv "SAGE_NUM_THREADS"

Reply via email to