guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15/15: gnu: python-mpmath: Update to 1.2.1.


From: guix-commits
Subject: 15/15: gnu: python-mpmath: Update to 1.2.1.
Date: Sun, 24 Oct 2021 16:39:11 -0400 (EDT)

rekado pushed a commit to branch core-updates-frozen
in repository guix.

commit b67013c8ca28c5f5b5c5e1eeb869870c2c1dabe9
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sun Oct 24 20:10:26 2021 +0000

    gnu: python-mpmath: Update to 1.2.1.
    
    * gnu/packages/python-xyz.scm (python-mpmath): Update to 1.2.1.
    [source]: Fetch from git.
    [arguments]: Run tests directly with pytest; set the version with 
setuptools.
    [native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/python-xyz.scm | 56 ++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 125c510..ab05086 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9346,31 +9346,41 @@ and statistical routines from scipy and statsmodels.")
 
 (define-public python-mpmath
   (package
-  (name "python-mpmath")
-  (version "1.1.0")
-  (source (origin
-            (method url-fetch)
-            (uri (pypi-uri "mpmath" version))
-            (file-name (git-file-name name version))
-            (sha256
-             (base32
-              "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
-  (build-system python-build-system)
-  (native-inputs
-   `(("python-pytest" ,python-pytest)))
-  (arguments
-   '(#:phases
-     (modify-phases %standard-phases
-       (replace 'check
-         (lambda _
-           (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
-  (home-page "https://mpmath.org";)
-  (synopsis "Arbitrary-precision floating-point arithmetic in python")
-  (description
-    "@code{mpmath} can be used as an arbitrary-precision substitute for
+    (name "python-mpmath")
+    (version "1.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fredrik-johansson/mpmath";)
+                    (commit "c6a35f9ee7c294bcf4e0517bc76b268843db9499")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0ifw59fjjls3mas104rh0frilvab2fhk1dkjraxlqni5n9l676im"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-version
+           (lambda _
+             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
+             ;; ZIP does not support timestamps before 1980.
+             (setenv "SOURCE_DATE_EPOCH" "315532800")))
+         (replace 'check
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "-vv")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page "https://mpmath.org";)
+    (synopsis "Arbitrary-precision floating-point arithmetic in python")
+    (description
+     "@code{mpmath} can be used as an arbitrary-precision substitute for
 Python's float/complex types and math/cmath modules, but also does much
 more advanced mathematics.")
-  (license license:bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-mpmath
   (package-with-python2 python-mpmath))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]