unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Formbi <formbi@protonmail.com>
Cc: 64803@debbugs.gnu.org
Subject: bug#64803: python-shiboken-6 fails
Date: Tue, 25 Jul 2023 08:21:34 +0800	[thread overview]
Message-ID: <87a5vkzvqp.wl-hako@ultrarare.space> (raw)
In-Reply-To: <Obvvt39na5TXQwz0aZbllgleESldUEzvy5uotAWhyZzwdYQmY0RJ7O1bEMH0mX_EMqhBxDz8Z6t3JouxvYyiF2218yARf_YqnUmAKdA-9cg=@protonmail.com>

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




  reply	other threads:[~2023-07-25 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-07-26 15:06   ` bug#64803: Close: " Hilton Chain via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5vkzvqp.wl-hako@ultrarare.space \
    --to=bug-guix@gnu.org \
    --cc=64803@debbugs.gnu.org \
    --cc=formbi@protonmail.com \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).