guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 31b4c153e1890b72407ae2543d8d92da3753102e
Author: Nicolas Graves <[email protected]>
AuthorDate: Sat Sep 27 18:03:12 2025 +0200

    gnu: python-mathlibtools: Switch to pyproject.
    
    * gnu/packages/lean.scm (python-mathlibtools):
    [source]: Switch to git-fetch.
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:test-flags>: Disable failing tests.
    [native-inputs]: Add python-pytest, python-setuptools.
    
    Change-Id: I48805383c0dd6fc4d033cbe7fe3e039cf388eb12
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/lean.scm | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 82bca77dd7..8229c7e730 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -24,11 +24,12 @@
   #:use-module (ice-9 match)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (guix build-system cmake)
-  #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix gexp)
   #:use-module (guix packages)
@@ -165,18 +166,33 @@ interactive and automated theorem proving.")
   (package
     (name "python-mathlibtools")
     (version "1.1.1")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "mathlibtools" version))
-              (sha256
-               (base32
-                "089pql105imx8z7ar1wiz9fn000jp6xqdfixw4jf2vric94vn9fj"))))
-    (build-system python-build-system)
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/leanprover-community/mathlib-tools";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kllk99cd9vsbmb0ifi21gkhrg2w803z4y5xhx0a7hx3viyjb3cv"))))
+    (build-system pyproject-build-system)
     (arguments
-     '(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'fix-home-directory
-                    (lambda _
-                      (setenv "HOME" "/tmp"))))))
+     (list
+      #:test-flags
+      #~(list "-k"
+              ;; These tests require network access.
+              (string-join (list "not test_new"
+                                 "test_add"
+                                 "test_upgrade_project"
+                                 "test_upgrade_mathlib"
+                                 "test_get_tutorials")
+                           " and not "))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'fix-home-directory
+            (lambda _
+              (setenv "HOME" "/tmp"))))))
+    (native-inputs (list python-pytest python-setuptools))
     (inputs (list python-toml
                   python-pygithub
                   python-certifi

Reply via email to