aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/maths.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 62bb666df4..1f805cb52c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -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+)))