1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: Add python-mathics-core.

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

Change-Id: I0e2571569e07ff89aa9bd1fa2638ff3d807bd4ec
This commit is contained in:
Danny Milosavljevic
2024-12-10 01:21:04 +01:00
parent 8ab106b3b7
commit 7efe81ea7d

View File

@@ -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+)))