GNU bug report logs - #74806
[WIP PATCH] gnu: python-mathics-core: Add docs.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Danny Milosavljevic <dannym@HIDDEN>; Keywords: patch; dated Thu, 12 Dec 2024 00:18:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Dec 2024 00:17:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 11 19:17:27 2024
Received: from localhost ([127.0.0.1]:36859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tLWtT-0004V0-7n
	for submit <at> debbugs.gnu.org; Wed, 11 Dec 2024 19:17:27 -0500
Received: from lists.gnu.org ([209.51.188.17]:52832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1tLWtP-0004Ud-4J
 for submit <at> debbugs.gnu.org; Wed, 11 Dec 2024 19:17:25 -0500
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 <dannym@HIDDEN>)
 id 1tLWtO-0000nz-Sj
 for guix-patches@HIDDEN; Wed, 11 Dec 2024 19:17:22 -0500
Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dannym@HIDDEN>)
 id 1tLWtM-0006NG-Hk
 for guix-patches@HIDDEN; Wed, 11 Dec 2024 19:17:22 -0500
X-Sender-Id: dreamhost|x-authsender|dannym@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id B8346901BCD;
 Thu, 12 Dec 2024 00:17:17 +0000 (UTC)
Received: from pdx1-sub0-mail-a297.dreamhost.com
 (trex-8.trex.outbound.svc.cluster.local [100.104.44.89])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 5626B900183;
 Thu, 12 Dec 2024 00:17:17 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1733962637; a=rsa-sha256;
 cv=none;
 b=pphWLAwLZD4YjfL37nJaR3fBqv4fHwqD3xgKVIHNito28cimNczPK8HYGO/mh9hjYYMP0S
 x7VUzJngzzNoUNtocU1PJDxrC8/yziQ+wLgTpWbeP0Uzxf/gH54ruQRHg1h7JZR/6n+Z0s
 7jCPQaIN1OCehuqNdv4PgFIV8uP2SHMbwbCh6jiR3scL3E5i6ApojOjjlhyF96yFNEOr2/
 FoPwUOKBaoX1HV9pPUz2Y8yQE1N1rfTOFwghxT3JB/2ll2PVEgBuBXiFJIhdA1Xk68/++N
 RaVPsPLedg170P6l3ShGDztBsTXIg7fZI19WtjgAu5Zx5t8yAjfM35UzgJh/9w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1733962637;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:dkim-signature;
 bh=GTh/q5HKF+LzOo5+Sb0eb9UoKBkrpdhRNcbBWQpMqlA=;
 b=CnMxWrJM3iWOSGyMk2Q7b5QDvDMLvrKePCakI984gq9soscuF/N9jUWspyJTzTfCA4bK3s
 tTMD/e0mNY6gnico3daJb9+oBadBQcA1Wnssx/fkPT7BCTJz4vUC4qssBwHP2GjOgGUrlW
 AZtwvoTkDippRPFY1QEuaV1F3kszFgFRFgATtXk/4sv1bRt/7I2cjdT5tfilnF+TIscCVh
 9nrmIBPItfZjpufEia5jda9S2HcheVeMagNl8SprymAOLEalNfeOxohmdBn61gUpGTTK4V
 dYJuhZo71maE0/FgrVWg9eafucSyPFTjGOtJhY+WggSPCuhUpoho8ItJfsuMBw==
ARC-Authentication-Results: i=1; rspamd-fc7fd4597-mbxdb;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=dannym@HIDDEN
X-Sender-Id: dreamhost|x-authsender|dannym@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|dannym@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Spot-Bottle: 2e5952c51c38c7e1_1733962637589_3795761489
X-MC-Loop-Signature: 1733962637589:1815561408
X-MC-Ingress-Time: 1733962637589
Received: from pdx1-sub0-mail-a297.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.104.44.89 (trex/7.0.2); Thu, 12 Dec 2024 00:17:17 +0000
Received: from localhost (84-115-227-145.cable.dynamic.surfer.at
 [84.115.227.145])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 (Authenticated sender: dannym@HIDDEN)
 by pdx1-sub0-mail-a297.dreamhost.com (Postfix) with ESMTPSA id 4Y7tMJ4tnmzSX; 
 Wed, 11 Dec 2024 16:17:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=friendly-machines.com; s=dreamhost; t=1733962637;
 bh=KIwuqctwHggWQHePDLG+/QFwt0l60TI182tdCgiuQpw=;
 h=From:To:Cc:Subject:Date:Content-Transfer-Encoding;
 b=ihHvYc/rpsFlwgcfQl0YqoswX0zFV8fvkmlpZyodYq/uUH/Iq5dVSsCzAZYv3gRcf
 xb7DyNnbEoXV2C/GjScSVdI0dQbTrk8NjmZI4SGUZxs7rdJK64vN52rsejyJw4yoCQ
 L9hXdSLRvq0+tXI9HeMYadzckoERJkGzOJ9g6e7Vdx7v2CAUlu9v4Zq1hj7101yFaX
 a40qTXIRyDnfjL2fDvViyktnrR+zColHkjblGVK6I2Tx+INh6Q2gOTMpgyy65B4ih5
 TY7MrnSgfhx2spRPpQxRhmcwPrU0YAo2VwIdr4U2Tz2LPkMEQmxO/qKjmap/RRGFUb
 5IOHABvoov+mQ==
From: Danny Milosavljevic <dannym@HIDDEN>
To: guix-patches@HIDDEN
Subject: [WIP PATCH] gnu: python-mathics-core: Add docs.
Date: Thu, 12 Dec 2024 01:08:54 +0100
Message-ID: <978305639e3c930a539ddd2018bc061716ed8b55.1733961494.git.dannym@HIDDEN>
X-Mailer: git-send-email 2.46.0
MIME-Version: 1.0
X-Debbugs-Cc: Andreas Enge <andreas@HIDDEN>, Eric Bavier <bavier@HIDDEN>,
 Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=23.83.218.253;
 envelope-from=dannym@HIDDEN;
 helo=iguana.tulip.relay.mailchannels.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: submit
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.6 (-)

I would like help fixing a build failure here (latexmk parallelism problem):

! Undefined control sequence.
l.289 \InputIfFile

./source/mathics/doc/latex/mathics.pre:

  \InputIfFileExists {\jobname -281.pre}{}{}
  \InputIfFileExists {\jobname -282.pre}{}{}
  \InputIfFileExists {\jobname -283.pre}{}{}
  \InputIfFileExists {\jobname -284.pre}{}{}
  \InputIfFileExists {\jobname -285.pre}{}{}
  \InputIfFileExists {\jobname -286.pre}{}{}
  \InputIfFileExists {\jobname -287.pre}{}{}
  \InputIfFileExists {\jobname -288.pre}{}{}
  \InputIfFile

(ed note: Cut off in the original)

* gnu/packages/plotutils.scm (asymptote): Install files where latex will find them.
* gnu/packages/maths.scm (python-mathics-core): Add docs.

Change-Id: Id2dac5f9b4b3bdcfbb751a94263261fb69edb461
---
 gnu/packages/maths.scm     | 57 +++++++++++++++++++++++++++++++++++---
 gnu/packages/plotutils.scm |  4 +--
 2 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 60203f82a9..ec2e43c737 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -124,13 +124,14 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages datamash)
   #:use-module (gnu packages dbm)
-  #:use-module (gnu packages documentation)
   #:use-module (gnu packages django)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
+  #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -152,6 +153,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages lua)
+  #:use-module (gnu packages plotutils)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xorg)
@@ -10537,6 +10539,7 @@ (define-public python-mathics-core
               (sha256
                (base32
                 "0hhk2qq6swnprf9hliazwi3858sv3b3015g0mnm4ycdk5fsc7y57"))))
+    (outputs '("out" "doc"))
     (arguments
      `(;; <https://github.com/pytest-dev/pytest/pull/10173> is missing .closed
        #:test-flags '("-s")
@@ -10544,6 +10547,11 @@ (define-public python-mathics-core
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-bugs
            (lambda _
+             (substitute* "mathics/doc/latex_doc.py"
+              (("^NUMBER_RE = .*")
+               ;; Prevent a match of "-7.0.0" (version number)
+               ; X"NUMBER_RE = re.compile(r\"([ -])(\d*(?<!\.)\.\d+|\d+\.(?!\.)\d*|\d+)(?![.0123456789])\")\n"
+               "NUMBER_RE = re.compile(r\"([ -])(\\d*(?<!\\.)\\.\\d+|\\d+\\.(?!\\.)\\d*|\\d+)(?![.0123456789])\")\n"))
              (substitute* "pyproject.toml"
               (("\"autoload/\\*.m\",")
                ;; They forgot to install autoload/rules/*.m
@@ -10551,15 +10559,56 @@ (define-public python-mathics-core
              ;; Prevent internet access by tests.
              (substitute* "mathics/builtin/files_io/files.py"
               (("https://raw.githubusercontent.com/Mathics3/mathics-core/master/README.rst")
-               (string-append (getcwd) "/README.rst")))))
+               (string-append (getcwd) "/README.rst")))
+             (substitute* "mathics/docpipeline.py"
+              ;; Undefined.
+              (("test_parameters[.]doc_even_if_error") "False"))))
+         ;; TODO: make latexdoc ; (cd mathics/doc/latex && $(MAKE) doc)
+         (add-after 'install 'build-docs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ; Would fuck up LOCAL_ROOT_DIR: (add-installed-pythonpath inputs outputs)
+             (setenv "PYTHONPATH" (getcwd))
+             (substitute* "mathics/settings.py"
+               (("^(ROOT_DIR = .*)" _ a) (string-append a "\nimport sys\nprint('XXROOT_DIR', ROOT_DIR, sys.stderr)\n")))
+             (setenv "HOME" "/tmp")
+             (mkdir-p "/tmp/.local/var/mathics")
+             (setenv "BASH" (which "bash"))
+             (invoke "make" "latexdoc")
+             ;; TODO: The other files.
+             (install-file "mathics/doc/latex/mathics-title.pdf"
+              (string-append (assoc-ref outputs "doc") "/share/doc/mathics"))))
          (add-before 'check 'prepare-locales
            (lambda _
              ;; Otherwise 210 tests fail because the real output would use
              ;; unicode arrow characters.  With this, only 18 (symbolic) tests fail.
              (setenv "MATHICS_CHARACTER_ENCODING" "ASCII"))))))
     (build-system pyproject-build-system)
-    (native-inputs (list python-pytest))
-    (inputs (list llvm))
+    (native-inputs (list python-pytest
+                         texlive-xetex
+                         font-latin-modern
+                         (texlive-updmap.cfg
+                          (list asymptote
+                                texlive-latexmk
+                                texlive-koma-script
+                                texlive-gensymb
+                                texlive-newpx
+                                texlive-xstring
+                                texlive-kastrup
+                                texlive-preprint
+                                texlive-listings
+                                texlive-paralist
+                                texlive-breqn
+                                texlive-environ
+                                texlive-colophon
+                                texlive-minitoc
+                                texlive-mlmodern
+                                texlive-palatino
+                                texlive-mathpazo
+                                texlive-pagella-otf
+                                texlive-tex-gyre-math))
+                         ghostscript
+                         bash))
+    (inputs (list llvm asymptote))
     (propagated-inputs (list python-mpmath
                              python-pint
                              python-palettable
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index d5b2f0d9fa..72faa6c31f 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -136,10 +136,10 @@ (define-public asymptote
                            (guix build emacs-utils))
       #:configure-flags
       #~(list (string-append "--enable-gc=" #$(this-package-input "libgc"))
-              (string-append "--with-latex=" #$output "/share/texmf/tex/latex")
+              (string-append "--with-latex=" #$output "/share/texmf-dist/tex/latex")
               (string-append "--with-context="
                              #$output
-                             "/share/texmf/tex/context/third"))
+                             "/share/texmf-dist/tex/context/third"))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'locate-tirpc

base-commit: 8b65fdc182e7340946be8b1e7b688d03b96c3482
-- 
2.46.0





Acknowledgement sent to Danny Milosavljevic <dannym@HIDDEN>:
New bug report received and forwarded. Copy sent to andreas@HIDDEN, bavier@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to andreas@HIDDEN, bavier@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN:
bug#74806; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.