gnu: python2-setuptools: Patch source code.

* gnu/packages/python-xyz.scm (python2-setuptools)[arguments]: Add phase
'compatibility-fixes.
This commit is contained in:
Ricardo Wurmus 2022-05-11 16:07:53 +02:00
parent 0b4300d4fd
commit 75ca0e5258
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1863,7 +1863,17 @@ (define-public python2-setuptools
;; FIXME: Tests require pytest, which itself relies on setuptools. ;; FIXME: Tests require pytest, which itself relies on setuptools.
;; One could bootstrap with an internal untested setuptools. ;; One could bootstrap with an internal untested setuptools.
(arguments (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 (native-inputs
(list unzip)) (list unzip))
(home-page "https://pypi.org/project/setuptools/") (home-page "https://pypi.org/project/setuptools/")