gnu: ocrodjvu: Fix build with python 3.11.

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

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

View file

@ -396,6 +396,12 @@ and background layers of images, which can then be encoded into a DjVu file.")
#:phases
#~(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'fix-for-python-3.11
(lambda _
(substitute* "lib/cli/ocrodjvu.py"
;; The getargspec function has been removed in python 3.11.
(("init_args, _, _, _ = inspect.getargspec\\(cls.__init__\\)")
"init_args = inspect.getfullargspec(cls.__init__).args"))))
(add-before 'check 'disable-failing-test
(lambda _
(substitute* "tests/test_ipc.py"