guix-commits
[Top][All Lists]
Advanced

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

72/150: gnu: python-pep517: Reset timestamps and add missing build input


From: guix-commits
Subject: 72/150: gnu: python-pep517: Reset timestamps and add missing build input.
Date: Sun, 24 Apr 2022 05:12:24 -0400 (EDT)

lbraun pushed a commit to branch wip-python-pep517
in repository guix.

commit a7fc5cf04634bdd262524378642f4c91ef92b547
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Fri Dec 31 11:48:06 2021 +0100

    gnu: python-pep517: Reset timestamps and add missing build input.
    
    * gnu/packages/python-xyz.scm (python-pep517)[arguments]: Add (ice-9
    ftw) to #:modules, add phase 'set-source-file-times-to-1980 copied from
    (gnu packages python), remove pytest invokation from 'unpack and rename to
    'remove-failing-tests.
    [native-inputs]: Add python-flit-core.
---
 gnu/packages/python-xyz.scm | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 55e736c978..9ab7ed6640 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10405,18 +10405,26 @@ plugin for flake8 to check PEP-8 naming conventions.")
     (inherit python-pep517-bootstrap)
     (name "python-pep517")
     (arguments
-     '(#:phases
+     '(#:modules ((ice-9 ftw)
+                  (srfi srfi-1)
+                  (srfi srfi-26)
+                  (guix build utils)
+                  (guix build python-build-system))
+       #:phases
        (modify-phases %standard-phases
-         (replace 'check
+         (add-after 'unpack 'remove-failing-tests
            (lambda* (#:key tests? #:allow-other-keys)
              (delete-file "pytest.ini")
              ;; This test tries to connect to the internet
-             (delete-file "tests/test_meta.py")
-             (if tests?
-               (invoke "pytest")
-               #t))))))
+             (delete-file "tests/test_meta.py")))
+         (add-after 'unpack 'set-source-file-times-to-1980
+           (lambda _
+             (let ((circa-1980 (* 10 366 24 60 60)))
+               (ftw "." (lambda (file stat flag)
+                          (utime file circa-1980 circa-1980)
+                          #t))))))))
     (native-inputs
-     (list python-mock python-pytest python-testpath))
+     (list python-mock python-pytest python-testpath python-flit-core))
     (properties `((python2-variant . ,(delay python2-pep517))))))
 
 ;; Skip the tests so we don't create a cyclical dependency with pytest.



reply via email to

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