python-shiboken-6 fails

  • Done
  • quality assurance status badge
Details
2 participants
  • Formbi
  • Hilton Chain
Owner
unassigned
Submitted by
Formbi
Severity
normal
F
F
Formbi wrote on 23 Jul 2023 13:26
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
Obvvt39na5TXQwz0aZbllgleESldUEzvy5uotAWhyZzwdYQmY0RJ7O1bEMH0mX_EMqhBxDz8Z6t3JouxvYyiF2218yARf_YqnUmAKdA-9cg=@protonmail.com
Hi!

The package python-shiboken-6 fails with this error:

*** Error compiling 'signature_bootstrap.py'...
Sorry: IndentationError: unexpected indent (signature_bootstrap.py, line 64)

The line in question (and the neighboring ones for context) looks like this:

import base64
import importlib
import importlib.machinery as imachi
import io
import sys
import traceback
import zipfile

I tried adding this to the package definition, but it didn't help:
(add-before 'build 'remove-indent
(lambda _
(substitute* "sources/shiboken6/libshiboken/embed/signature_bootstrap.py"
((" import importlib.machinery as imachi")
"import importlib.machinery as imachi"))))

Someone on IRC suggested to use this, but it didn't work either:
(add-before 'build 'remove-indent
(lambda _
(substitute* "libshiboken/embed/signature_bootstrap.py"
(("[ \t]*(import
importlib\\.machinery.*)" _ suffix) suffix))))

How should I go about fixing this?

Kind regards
H
H
Hilton Chain wrote on 25 Jul 2023 02:21
(name . Formbi)(address . formbi@protonmail.com)(address . 64803@debbugs.gnu.org)
87a5vkzvqp.wl-hako@ultrarare.space
Hello Formbi,

On Sun, 23 Jul 2023 19:26:11 +0800,
Formbi via Bug reports for GNU Guix wrote:
Toggle quote (11 lines)
> The line in question (and the neighboring ones for context) looks
> like this:
>
> import base64
> import importlib
> import importlib.machinery as imachi
> import io
> import sys
> import traceback
> import zipfile

python-shiboken-6 inherits the definition of python-shiboken-2, which
has the following phase:
Toggle snippet (15 lines)
(add-before 'configure 'workaround-importlib-error
(lambda _
;; The following hack works around the error
;; "module 'importlib' has no attribute 'machinery'"
;; when building python-pyside-2, which depends on
;; this package.
(substitute* "libshiboken/embed/signature_bootstrap.py"
(("import importlib" all)
(string-append
all
"\n import importlib.machinery as imachi"))
(("importlib.machinery.ModuleSpec")
"imachi.ModuleSpec"))))

So python-shiboken-6 inherits the workaround as well, and that causes
the issue.


Toggle quote (2 lines)
> How should I go about fixing this?

Delete the phase in python-shiboken-6 or rewrite it if necessarily. :)

There should be no need to keep it, as I can build python-pyside-6
with the following change:
Toggle snippet (14 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a79338f84e..e8654eee44 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -4005,6 +4005,7 @@ (define-public python-shiboken-6
(substitute-keyword-arguments (package-arguments python-shiboken-2)
((#:phases p)
#~(modify-phases #$p
+ (delete 'workaround-importlib-error)
(replace 'use-shiboken-dir-only
(lambda _ (chdir "sources/shiboken6")))))
((#:configure-flags flags)

I have sent the change to https://issues.guix.gnu.org/64841.

Thanks
H
H
Hilton Chain wrote on 26 Jul 2023 17:06
Close: bug#64803: python-shiboken-6 fails
(address . 64803-done@debbugs.gnu.org)
87wmymww46.wl-hako@ultrarare.space
Fixed in e05dcecd0df49a397aba49585a626cae16a6306c.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64803@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64803
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch