~ruther/guix-local

7efe81ea7df49edf0fb727ac575c955c3fed7e17 — Danny Milosavljevic 1 year, 10 months ago 8ab106b
gnu: Add python-mathics-core.

* gnu/packages/maths.scm (python-mathics-core): New variable.

Change-Id: I0e2571569e07ff89aa9bd1fa2638ff3d807bd4ec
1 files changed, 53 insertions(+), 0 deletions(-)

M gnu/packages/maths.scm
M gnu/packages/maths.scm => gnu/packages/maths.scm +53 -0
@@ 10477,3 10477,56 @@ architecture.")
     "This package provides character tables and a tokenizer for Mathics and
the Wolfram language.")
    (license license:gpl3+)))

(define-public python-mathics-core
  (package
    (name "python-mathics-core")
    (version "7.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
                "0hhk2qq6swnprf9hliazwi3858sv3b3015g0mnm4ycdk5fsc7y57"))))
    (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")))))
         (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))
    (propagated-inputs (list python-mpmath
                             python-pint
                             python-palettable
                             python-sympy
                             python-numpy
                             python-mathics-scanner
                             python-pillow
                             python-dateutil
                             python-requests
                             python-llvmlite
                             python-scipy))
    (synopsis "Computer algebra system")
    (description "This package provides a computer algebra system--an alternative
to Wolfram.")
    (home-page "https://mathics.org/")
    (license license:gpl3+)))