guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 56bbb54b749bd63df7857e0813f725c3a0de80a1
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Fri Sep 18 23:33:39 2026 +0100

    gnu: python-mathics-core: Refresh package style.
    
    * gnu/packages/maths.scm (python-mathics-core): Use G-Expressions. Fix
    indentation.
    [source] <url>: Remove trailing ".git" to fix redirection.
    [propagated-inputs]: Sort list alphabetically.
    [native-inputs]: Remove python-wheel.
---
 gnu/packages/maths.scm | 167 +++++++++++++++++++++++++------------------------
 1 file changed, 86 insertions(+), 81 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b919553030a..b027b090ddf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -11369,92 +11369,97 @@ the Wolfram language.")
   (package
     (name "python-mathics-core")
     (version "9.0.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/Mathics3/mathics-core.git";)
-                     (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "19232vs3sxg1nq32cas8hwsiwvp6nzpnz4jzjjahpvrv1bl62prs"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/Mathics3/mathics-core";)
+              (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "19232vs3sxg1nq32cas8hwsiwvp6nzpnz4jzjjahpvrv1bl62prs"))))
     (arguments
-     `(;; <https://github.com/pytest-dev/pytest/pull/10173> is missing .closed
-       #:test-flags '("-s")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-bugs
-           (lambda _
-             (substitute* "pyproject.toml"
-              (("\"autoload/\\*.m\",")
-               ;; They forgot to install autoload/rules/*.m
-               "\"autoload/*.m\", \"autoload/rules/*.m\","))
-             ;; 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")))
-             ;; llvmlite 0.45+ auto-initializes LLVM; calling initialize()
-             ;; now raises RuntimeError.
-             ;; 
<https://llvmlite.readthedocs.io/en/v0.45.0/user-guide/binding/initialization-finalization.html>
-             (substitute* "mathics/compile/compile.py"
-              (("llvm\\.initialize\\(\\)") "pass"))
-             ;; The JSON operator tables (op-tables.json, operator-tables.json)
-             ;; are pre-generated in the PyPI tarball but not in git.
-             ;; The Makefile runs admin-tools/make-JSON-tables.sh before
-             ;; 'make dist', but that script also writes to the scanner's
-             ;; default location which is read-only in the store.  Run the
-             ;; needed commands directly.  setup.py has fallback generation
-             ;; code but it's buggy: it writes operator-tables.json to the
-             ;; wrong path and op-tables.json is missing
-             ;; --field=operator-to-amslatex.  Creating the files first
-             ;; makes setup.py's 'if not os.path.exists' checks pass and
-             ;; the buggy code is skipped.
-             (with-directory-excursion "mathics/data"
-               (invoke "mathics3-generate-json-table"
-                       "--field=ascii-operator-to-symbol"
-                       "--field=ascii-operator-to-unicode"
-                       "--field=ascii-operator-to-wl-unicode"
-                       "--field=operator-to-ascii"
-                       "--field=operator-to-amslatex"
-                       "--field=operator-to-unicode"
-                       "-o" "op-tables.json")
-               (invoke "mathics3-generate-operator-json-table"
-                       "-o" "operator-tables.json"))))
-         (add-before 'build 'set-home
-           (lambda _
-             ;; The sanity check imports mathics which tries to create a
-             ;; config directory in HOME.  Set HOME to a writable location.
-             (setenv "HOME" "/tmp")))
-         (add-before 'check 'prepare-check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;(copy-file "operator-tables.json" 
"mathics/data/operator-tables.json")
-             ; Doesn't work: (add-installed-pythonpath inputs outputs)
-             (setenv "PYTHONPATH" (getcwd))))
-         (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"))))))
+     (list
+      ;; <https://github.com/pytest-dev/pytest/pull/10173> is missing .closed
+      #:test-flags #~(list "-s")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-bugs
+            (lambda _
+              (substitute* "pyproject.toml"
+                (("\"autoload/\\*.m\",")
+                 ;; They forgot to install autoload/rules/*.m
+                 "\"autoload/*.m\", \"autoload/rules/*.m\","))
+              ;; 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")))
+              ;; llvmlite 0.45+ auto-initializes LLVM; calling initialize()
+              ;; now raises RuntimeError.
+              ;; 
<https://llvmlite.readthedocs.io/en/v0.45.0/user-guide/binding/initialization-finalization.html>
+              (substitute* "mathics/compile/compile.py"
+                (("llvm\\.initialize\\(\\)") "pass"))
+              ;; The JSON operator tables (op-tables.json,
+              ;; operator-tables.json) are pre-generated in the PyPI tarball
+              ;; but not in git.  The Makefile runs
+              ;; admin-tools/make-JSON-tables.sh before 'make dist', but that
+              ;; script also writes to the scanner's default location which is
+              ;; read-only in the store.  Run the needed commands directly.
+              ;; setup.py has fallback generation code but it's buggy: it
+              ;; writes operator-tables.json to the wrong path and
+              ;; op-tables.json is missing --field=operator-to-amslatex.
+              ;; Creating the files first makes setup.py's 'if not
+              ;; os.path.exists' checks pass and the buggy code is skipped.
+              (with-directory-excursion "mathics/data"
+                (invoke "mathics3-generate-json-table"
+                        "--field=ascii-operator-to-symbol"
+                        "--field=ascii-operator-to-unicode"
+                        "--field=ascii-operator-to-wl-unicode"
+                        "--field=operator-to-ascii"
+                        "--field=operator-to-amslatex"
+                        "--field=operator-to-unicode"
+                        "-o" "op-tables.json")
+                (invoke "mathics3-generate-operator-json-table"
+                        "-o" "operator-tables.json"))))
+          (add-before 'build 'set-home
+            (lambda _
+              ;; The sanity check imports mathics which tries to create a
+              ;; config directory in HOME.  Set HOME to a writable location.
+              (setenv "HOME" "/tmp")))
+          (add-before 'check 'prepare-check
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              ;; (copy-file "operator-tables.json"
+              ;; "mathics/data/operator-tables.json") Doesn't work:
+              ;; (add-installed-pythonpath inputs outputs)
+              (setenv "PYTHONPATH" (getcwd))))
+          (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 python-setuptools python-wheel))
+    (native-inputs (list python-pytest python-setuptools))
     (inputs (list llvm))
-    (propagated-inputs (list python-mpmath
-                             python-pint
-                             python-palettable
-                             python-pympler
-                             python-stopit
-                             python-sympy
-                             python-numpy
-                             python-mathics-scanner
-                             python-pillow
-                             python-dateutil
-                             python-requests
-                             python-llvmlite
-                             python-scipy))
+    (propagated-inputs
+     (list python-dateutil
+           python-mpmath
+           python-llvmlite
+           python-mathics-scanner
+           python-numpy
+           python-palettable
+           python-pillow
+           python-pint
+           python-pympler
+           python-requests
+           python-scipy
+           python-stopit
+           python-sympy))
     (synopsis "Computer algebra system")
-    (description "This package provides a computer algebra system--an 
alternative
-to Wolfram.")
     (home-page "https://mathics.org/";)
+    (description
+     "This package provides a computer algebra system--an alternative to
+Wolfram.")
     (license license:gpl3)))
 
 (define-public python-mathicsscript

Reply via email to