[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64803: python-shiboken-6 fails
From: |
Hilton Chain |
Subject: |
bug#64803: python-shiboken-6 fails |
Date: |
Tue, 25 Jul 2023 08:21:34 +0800 |
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