* bug#64803: python-shiboken-6 fails
@ 2023-07-23 11:26 Formbi via Bug reports for GNU Guix
2023-07-25 0:21 ` Hilton Chain via Bug reports for GNU Guix
0 siblings, 1 reply; 3+ messages in thread
From: Formbi via Bug reports for GNU Guix @ 2023-07-23 11:26 UTC (permalink / raw)
To: 64803
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#64803: python-shiboken-6 fails
2023-07-23 11:26 bug#64803: python-shiboken-6 fails Formbi via Bug reports for GNU Guix
@ 2023-07-25 0:21 ` Hilton Chain via Bug reports for GNU Guix
2023-07-26 15:06 ` bug#64803: Close: " Hilton Chain via Bug reports for GNU Guix
0 siblings, 1 reply; 3+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-07-25 0:21 UTC (permalink / raw)
To: Formbi; +Cc: 64803
Hello Formbi,
On Sun, 23 Jul 2023 19:26:11 +0800,
Formbi via Bug reports for GNU Guix wrote:
> 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:
--8<---------------cut here---------------start------------->8---
(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"))))
--8<---------------cut here---------------end--------------->8---
So python-shiboken-6 inherits the workaround as well, and that causes
the issue.
> 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:
--8<---------------cut here---------------start------------->8---
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)
--8<---------------cut here---------------end--------------->8---
I have sent the change to <https://issues.guix.gnu.org/64841>.
Thanks
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-26 15:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-23 11:26 bug#64803: python-shiboken-6 fails Formbi via Bug reports for GNU Guix
2023-07-25 0:21 ` Hilton Chain via Bug reports for GNU Guix
2023-07-26 15:06 ` bug#64803: Close: " Hilton Chain via Bug reports for GNU Guix
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.