gnu: mozjs@78: Patch for Python 3.10.

* gnu/packages/gnuzilla.scm (mozjs-78)[arguments]: Add phase.
This commit is contained in:
Marius Bakke 2022-08-16 10:28:31 +02:00
parent 48718135e7
commit 1cad443b02
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -265,6 +265,25 @@ (define-public mozjs-78
(substitute-keyword-arguments (package-arguments mozjs) (substitute-keyword-arguments (package-arguments mozjs)
((#:phases phases) ((#:phases phases)
#~(modify-phases #$phases #~(modify-phases #$phases
(add-after 'unpack 'patch-for-python-3.10
(lambda _
;; Some classes were moved from collections to collections.abc
;; in Python 3.10.
(substitute* "python/mozbuild/mozbuild/util.py"
(("collections\\.Sequence")
"collections.abc.Sequence"))
(substitute* "python/mozbuild/mozbuild/makeutil.py"
(("from collections import Iterable")
"from collections.abc import Iterable"))
(substitute* "python/mozbuild/mozbuild/backend/configenvironment.py"
(("from collections import Iterable, OrderedDict")
"from collections import OrderedDict\n\
from collections.abc import Iterable"))
(substitute*
"testing/mozbase/manifestparser/manifestparser/filters.py"
(("from collections import defaultdict, MutableSequence")
"from collections import defaultdict\n\
from collections.abc import MutableSequence"))))
(replace 'configure (replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys) (lambda* (#:key configure-flags #:allow-other-keys)
;; The configure script does not accept environment variables as ;; The configure script does not accept environment variables as