gnu: python-mox3: Fix build with python 3.11.

* gnu/packages/openstack.scm (python-mox3)[arguments]: Add
  'fix-for-python-3.11' phase.

Change-Id: I187c07a837d57fd64fda5e7335246952a9be6e80
This commit is contained in:
Guillaume Le Vaillant 2025-04-22 11:40:02 +02:00
parent 0c4d0a702b
commit cb642fb70c
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -199,6 +199,19 @@ guidelines}.")
(native-inputs
(list python-openstackdocstheme python-sphinx python-subunit
python-testrepository python-testtools))
(arguments
(list #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-for-python-3.11'
(lambda _
;; The getargspec function has been removed in python 3.11.
(substitute* "mox3/mox.py"
(("self\\._args, varargs, varkw, defaults = inspect\\.getargspec\\(method\\)")
"inspect_result = inspect.getfullargspec(method)
self._args = inspect_result.args
varargs = inspect_result.varargs
varkw = inspect_result.varkw
defaults = inspect_result.defaults")))))))
(home-page "https://www.openstack.org/")
(synopsis "Mock object framework for Python")
(description