[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: python-setuptools-for-tensorflow: Fix build.
From: |
guix-commits |
Subject: |
01/02: gnu: python-setuptools-for-tensorflow: Fix build. |
Date: |
Wed, 15 Dec 2021 02:33:13 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit 728f1568d81cd87cd42f4d08e5f3f4f240a272a3
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Dec 15 08:28:27 2021 +0100
gnu: python-setuptools-for-tensorflow: Fix build.
* gnu/packages/python-xyz.scm (python-setuptools-for-tensorflow)[arguments]:
Add phase 'compatibility-fixes; disable tests.
[native-inputs]: Add python-pytest, python-mock, and python-six.
---
gnu/packages/python-xyz.scm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8d3b582..7f32fd2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1810,7 +1810,7 @@ Python 3 support.")
@code{setup.cfg}.")
(license license:asl2.0)))
-;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
+;; The setuptools provided by Python 3.9 is too new for Tensorflow.
(define-public python-setuptools-for-tensorflow
(hidden-package
(package
@@ -1821,7 +1821,21 @@ Python 3 support.")
(uri (pypi-uri "setuptools" version ".zip"))
(sha256
(base32
- "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
+ "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65"))))
+ (arguments
+ `(#:tests? #f ; tests require vendored resources
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'compatibility-fixes
+ (lambda _
+ ;; Python 3.9 no longer has HTMLParser
+ (substitute* "setuptools/py33compat.py"
+ (("html_parser.HTMLParser\\(\\).unescape")
+ "html.unescape"))
+ ;; This needs distutils.msvc9compiler
+ (delete-file "setuptools/tests/test_msvc.py"))))))
+ (native-inputs
+ (list python-pytest python-mock python-six)))))
(define-public python-uniseg
(package