From 75ca0e52581f7da95f540acadada671ee08a0cda Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 May 2022 16:07:53 +0200 Subject: gnu: python2-setuptools: Patch source code. * gnu/packages/python-xyz.scm (python2-setuptools)[arguments]: Add phase 'compatibility-fixes. --- gnu/packages/python-xyz.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ab4102273a..0ef71605e9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1863,7 +1863,17 @@ Python 3 support.") ;; FIXME: Tests require pytest, which itself relies on setuptools. ;; One could bootstrap with an internal untested setuptools. (arguments - `(#:tests? #f)) + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'compatibility-fixes + (lambda _ + ;; HTMLParser no longer exists. + (substitute* "setuptools/py33compat.py" + (("html_parser.HTMLParser\\(\\).unescape") + "html.unescape")) + ;; This needs distutils.msvc9compiler + (delete-file "setuptools/tests/test_msvc.py")))))) (native-inputs (list unzip)) (home-page "https://pypi.org/project/setuptools/") -- cgit v1.2.3