From patchwork Mon May 29 20:38:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vicvbcun X-Patchwork-Id: 50469 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B28DD27BBE9; Mon, 29 May 2023 21:43:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 69B8D27BBE2 for ; Mon, 29 May 2023 21:43:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3jhv-000735-UP; Mon, 29 May 2023 16:43:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3jhn-0006xM-JA for guix-patches@gnu.org; Mon, 29 May 2023 16:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3jhn-0002bH-As for guix-patches@gnu.org; Mon, 29 May 2023 16:43:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3jhn-0007wj-6q for guix-patches@gnu.org; Mon, 29 May 2023 16:43:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56729] [RFC PATCH v3 32/32] gnu: Add sagemath. Resent-From: vicvbcun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 May 2023 20:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56729 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56729@debbugs.gnu.org Cc: Andreas Enge Received: via spool by 56729-submit@debbugs.gnu.org id=B56729.168539297130496 (code B ref 56729); Mon, 29 May 2023 20:43:03 +0000 Received: (at 56729) by debbugs.gnu.org; 29 May 2023 20:42:51 +0000 Received: from localhost ([127.0.0.1]:59326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3jhb-0007vi-Cf for submit@debbugs.gnu.org; Mon, 29 May 2023 16:42:51 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([85.215.255.135]:40155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3jhT-0007vF-HG for 56729@debbugs.gnu.org; Mon, 29 May 2023 16:42:45 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1685392778; cv=none; d=strato.com; s=strato-dkim-0002; b=qKU1VXxVOPjz1Rye0j9lCLp8thxCeUSXnJ5LYo4lxuEBBV/gSerWXKJXWYdUl7/+Vz 30ltMOQrMPZJ8Tn9ufLdkexDA1ZHUh6DZmExHRhAPIaCogxEl+zhswIpjN+SpmbCg2F/ fGZRbUrXilRwJFhQSAAdjBvLQfyefwYPzGkoyVYtVSEEHK5huTfOhZ0S6dhvBSYyYgns flgG2bjFGJaSBnVzCgBbPm4DhH7WNN/Ydkbfc3eJK92arXaRjRum8V+EecR16AvwyVJM hPn1UEOwYDw6b6UrTZW4QpgK/PAE1pHY2Jp0Uc1Bw9lxVT/tIsiiGa4Bkx1478QrvCIH dEvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685392778; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=I7b2VQGP4UtePYooy/WJ/CKHRg58RE63UlFKLlWcvJI=; b=AkKGSHd3BtBycJZJRTlNsP8u86YujIuJvj6DdlkpPTVPGqaIqJ/AI3lD3Oef8Rblyf N1gdrmqg1QYS1ZtMuejL+ssXVgipZCWyAp6ejnXxTwLgZgAAvdKI1H7fNvC+M2wiOWdj kDTeIiWup7NqXd9uh862dPfiGf/UFLgiu30beZUzNkQVevwInyheUT525EOGQX/+NmBI Y4v2jAGIG9cNdKpKaU6P5PHJ52Yz7q+pIxGhAXpnkM1dmf5HAico9VFqQJRi1CYX7Ouu Fh2jmeaWzUx5fIjddn74ZP/6azJEu+i3LMxqVqchayYGmzaPD23bvsKGWf3f4nNWQ7HN P6Vw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685392778; s=strato-dkim-0002; d=ikherbers.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=I7b2VQGP4UtePYooy/WJ/CKHRg58RE63UlFKLlWcvJI=; b=LXES0GbVf/FqYGPjzviloTv9JAvj0o49BgF2Qmmoik2UnuZSAiRVxwEMRq/LUI/rXU i9ZEW6PDqonCU7RViAI7WN8ykQd3gt2Sc9SNNp6ET8M6kUoiSzy9tgZxwxrrYzT2K4Y5 bZfhXc4MxoJGV9rQ+5kh+rgQV9GAji2QQE7nxGK/Ao2Zz9t1qxpArGZub5IhOqTPexrY lUxHGMGlrDclYSP27kuIHmuCp1+Oalb1OObOGT2bUtuNT3YC710P47PcIjROGQDCeUf5 +WceN12iJjOrgIoOEYhwZs+WMFgjaIuSEKOMH0VWvC33ANNCcjrIcodcAut8KDKoqFEL 3Law== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685392778; s=strato-dkim-0003; d=ikherbers.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=I7b2VQGP4UtePYooy/WJ/CKHRg58RE63UlFKLlWcvJI=; b=WU4EyyqP5T7Wb5ESelvxdE37tZdSf/xNpa7B9sz3Cx/6trmHO7a1nGkOsjXuksAQS6 ZdZQR1KOm3hBBsGN5LAw== X-RZG-AUTH: ":IUwNfkitaf3qOWm2b/jA5tveVwUUcwH3PkiYp6DPxTDDEo4xO9elHkvI0r6JTEEwPZQIGpITRHJw3QBV19xfC5caujhgQnTJiaYr" X-RZG-CLASS-ID: mo05 Received: from lambda.localdomain by smtp.strato.de (RZmta 49.4.0 AUTH) with ESMTPSA id z055e6z4TKdcn7f (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 29 May 2023 22:39:38 +0200 (CEST) From: vicvbcun Date: Mon, 29 May 2023 22:38:41 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/sagemath.scm (sagemath): New variable. --- Notes: Higher timeout (default: 5 min.) or disable entirely? The `--timeout' flag needs to be immediately after `t' gnu/packages/sagemath.scm | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm index 4f23a7b7a0..69a9af0528 100644 --- a/gnu/packages/sagemath.scm +++ b/gnu/packages/sagemath.scm @@ -39,6 +39,7 @@ (define-module (gnu packages sagemath) #:use-module (gnu packages base) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) + #:use-module (gnu packages commencement) #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gd) @@ -690,3 +691,70 @@ (define-public python-sagemath-standard combined power through a common, Python-based language or directly via interfaces or wrappers.") (license license:gpl3))) + +(define-public sagemath + (package + (inherit python-sagemath-standard) + (name "sagemath") + (arguments + (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'prepare + (lambda _ + (setenv "HOME" (string-append (getenv "TMPDIR") "/home")) + (mkdir-p (getenv "HOME")) + (chdir "src") + + ;; prevent paging for `sage/repl/ipython_tests.py' + (setenv "TERM" "dumb") + + ;; for `sage --sh' in `sage/tests/cmdline.py' + (setenv "SHELL" (which "bash")) + + (for-each + delete-file + '("sage/repl/ipython_kernel/install.py" ; needs threejs + + ;; works in a container + "sage/typeset/ascii_art.py" + "sage/interfaces/gap_workspace.py" + "sage/misc/sage_ostools.pyx" ; checks for /bin/sh + "sage/repl/ipython_tests.py" + + ;; downgrade to 5.45 may fix this: + ;; https://github.com/sagemath/sage/issues/33718 + ;; https://sourceforge.net/p/maxima/bugs/3964/ + "sage/calculus/calculus.py" + "sage/interfaces/maxima_lib.py" + "sage/functions/exp_integral.py" ; correct, but different form + "sage/symbolic/integration/integral.py" ; correct, but exact not floating point + "sage/symbolic/relation.py" ; order in minimum different + + "sage/repl/ipython_kernel/kernel.py" ; deprecation warnings triggered + ; by `python-pydevd' + + ;; TODO + "sage/env.py" ; maybe try updating `python-pkgconfig'? + "sage/interacts/test_jupyter.rst" ; maybe `python-ipywidgets' is too old? + )))) + (replace 'check + (lambda* (#:key inputs tests? #:allow-other-keys) + (when tests? + (invoke (search-input-file inputs "/bin/sage") + "-t" + "--nthreads" + (number->string (parallel-job-count)) + ;; the file / directory we want to test + "sage")))) + (delete 'build) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let + ((target (string-append #$output "/bin")) + (source (search-input-file inputs "/bin/sage"))) + (mkdir-p target) + (symlink source (string-append target "/sage")))))))) + (inputs (list python-sagemath-standard)) + (native-inputs + (list python-sagemath-standard + gcc-toolchain + gfortran-toolchain))))