guix-commits
[Top][All Lists]
Advanced

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

18/103: gnu: python-openpyxl: Fix timestamps before testing.


From: guix-commits
Subject: 18/103: gnu: python-openpyxl: Fix timestamps before testing.
Date: Wed, 5 Jan 2022 09:44:29 -0500 (EST)

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

commit 385b567f70a784257ddedca96ce27ba0c874b774
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sat Nov 27 17:22:50 2021 +0100

    gnu: python-openpyxl: Fix timestamps before testing.
    
    The tests use ZIP files, which cannot handle timestamps before 1980. Reset
    them. The custom 'check phase is not required any more.
    
    * gnu/packages/python-xyz.scm (python-openpyxl)[#:phases]: Remove 'check,
    add 'set-mtime.
---
 gnu/packages/python-xyz.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a19939eb84..6e9925c8f0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2316,9 +2316,13 @@ of @code{xmlfile}.")
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
-                  (replace 'check
+                  (add-before 'check 'set-mtime
                     (lambda _
-                      (invoke "pytest"))))))
+                      (let ((early-1980 315619200))  ; 1980-01-02 UTC
+                        (for-each
+                          (lambda (file)
+                            (utime file early-1980 early-1980))
+                         (find-files "."))))))))
     (native-inputs
      ;; For the test suite.
      (list python-lxml python-pillow python-pytest))



reply via email to

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