guix-commits
[Top][All Lists]
Advanced

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

21/150: gnu: python-openpyxl: Fix timestamps before testing.


From: guix-commits
Subject: 21/150: gnu: python-openpyxl: Fix timestamps before testing.
Date: Sun, 24 Apr 2022 05:12:17 -0400 (EDT)

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

commit ac21290f46c2c2a100c09a2b745498d3c10405f3
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 d33f457dd5..567c4585b6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2378,9 +2378,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]