[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: gnu: python-future: Fix sanity check.
From: |
guix-commits |
Subject: |
01/05: gnu: python-future: Fix sanity check. |
Date: |
Sat, 15 Jan 2022 04:01:31 -0500 (EST) |
lilyp pushed a commit to branch master
in repository guix.
commit 87ad9d283cac257447d91114c8d3df6ca9ba7f82
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Fri Dec 17 18:56:56 2021 +0100
gnu: python-future: Fix sanity check.
* gnu/packages/python-xyz.scm (python-future): Exclude winreg and tkinter
from
sanity check.
---
gnu/packages/python-xyz.scm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eb2e54da35..76333138bc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15253,7 +15253,24 @@ development version of CPython that are not available
in older releases.")
;; Many tests connect to the network or are otherwise flawed.
;; https://github.com/PythonCharmers/python-future/issues/210
(arguments
- `(#:tests? #f))
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'sanity-check
+ (let ((sanity-check (assoc-ref %standard-phases 'sanity-check)))
+ (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+ (let* ((files (find-files (site-packages inputs outputs)
+ "top_level\\.txt"))
+ (backups (map (lambda (f) (string-append f ".bak"))
+ files)))
+ (for-each copy-file files backups)
+ (substitute* files
+ ;; Nobody be usin' winreg on Guix
+ ;; Also, don't force users to have tkinter when they don't
+ ;; need it
+ (("(winreg|tkinter)") ""))
+ (apply sanity-check args)
+ (for-each rename-file backups files))))))))
(home-page "https://python-future.org")
(synopsis "Single-source support for Python 3 and 2")
(description