GNU bug report logs - #29292
[PATCH] Scribus: Fix No module named _sysconfigdata_nd

Previous Next

Package: guix-patches;

Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Date: Mon, 13 Nov 2017 23:45:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29292 in the body.
You can then email your comments to 29292 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29292; Package guix-patches. (Mon, 13 Nov 2017 23:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 13 Nov 2017 23:45:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] Scribus: Fix No module named _sysconfigdata_nd
Date: Tue, 14 Nov 2017 00:44:25 +0100
[Message part 1 (text/plain, inline)]
Hello,

This patch is an attempt to fix bug #25035, thanks to the Guix people on
IRC.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738
[0001-gnu-scribus-Fix-No-module-named-_sysconfigdata_nd.patch (text/x-diff, inline)]
From 445ce30a90250d6c584a98ac60fddb4b96f1a3a7 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Tue, 14 Nov 2017 00:35:46 +0100
Subject: [PATCH] gnu: scribus: Fix No module named _sysconfigdata_nd

* gnu/packages/scribus.scm (scribus): Wrap PATH with expected Python around
  executable.

This fixes #25035.
---
 gnu/packages/scribus.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
index 6230195ed..860d34677 100644
--- a/gnu/packages/scribus.scm
+++ b/gnu/packages/scribus.scm
@@ -81,7 +81,19 @@
     (arguments
      `(#:tests? #f                      ;no test target
        #:configure-flags
-       '("-DWANT_GRAPHICSMAGICK=1")))
+       '("-DWANT_GRAPHICSMAGICK=1")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Fix "ImportError: No module named _sysconfigdata_nd" where
+             ;; Scribus checks PATH and eventually runs system's Python
+             ;; instead of package's.
+             (let* ((out (assoc-ref outputs "out"))
+                    (py2 (assoc-ref inputs "python")))
+               (wrap-program (string-append out "/bin/scribus")
+                 `("PATH" ":" prefix (,(string-append py2 "/bin")))))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("cairo" ,cairo)
-- 
2.14.3


Information forwarded to guix-patches <at> gnu.org:
bug#29292; Package guix-patches. (Tue, 14 Nov 2017 00:08:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> hyperbola.info>
To: guix-patches <at> gnu.org
Subject: Re: [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
Date: Mon, 13 Nov 2017 22:07:42 -0200
Wow!

Thank you very much for the patch, once I have the time to, I will test
it. If someone else is also affected, feel free to test it too. :)

Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> Hello,
>
> This patch is an attempt to fix bug #25035, thanks to the Guix people on
> IRC.
>
> Regards,
>
> -- 
> Nicolas Goaziou                                                0x80A93738
>
> From 445ce30a90250d6c584a98ac60fddb4b96f1a3a7 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
> Date: Tue, 14 Nov 2017 00:35:46 +0100
> Subject: [PATCH] gnu: scribus: Fix No module named _sysconfigdata_nd
>
> * gnu/packages/scribus.scm (scribus): Wrap PATH with expected Python around
>   executable.
>
> This fixes #25035.
> ---
>  gnu/packages/scribus.scm | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
> index 6230195ed..860d34677 100644
> --- a/gnu/packages/scribus.scm
> +++ b/gnu/packages/scribus.scm
> @@ -81,7 +81,19 @@
>      (arguments
>       `(#:tests? #f                      ;no test target
>         #:configure-flags
> -       '("-DWANT_GRAPHICSMAGICK=1")))
> +       '("-DWANT_GRAPHICSMAGICK=1")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             ;; Fix "ImportError: No module named _sysconfigdata_nd" where
> +             ;; Scribus checks PATH and eventually runs system's Python
> +             ;; instead of package's.
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (py2 (assoc-ref inputs "python")))
> +               (wrap-program (string-append out "/bin/scribus")
> +                 `("PATH" ":" prefix (,(string-append py2 "/bin")))))
> +             #t)))))
>      (inputs
>       `(("boost" ,boost)
>         ("cairo" ,cairo)

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.




Information forwarded to guix-patches <at> gnu.org:
bug#29292; Package guix-patches. (Thu, 16 Nov 2017 09:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 29292 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 29292 <at> debbugs.gnu.org
Subject: Re: [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
Date: Thu, 16 Nov 2017 10:58:17 +0100
Hi Nicolas,

Nicolas Goaziou <mail <at> nicolasgoaziou.fr> skribis:

>>From 445ce30a90250d6c584a98ac60fddb4b96f1a3a7 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
> Date: Tue, 14 Nov 2017 00:35:46 +0100
> Subject: [PATCH] gnu: scribus: Fix No module named _sysconfigdata_nd
>
> * gnu/packages/scribus.scm (scribus): Wrap PATH with expected Python around
>   executable.
>
> This fixes #25035.

Please make it “Fixes <https://bugs.gnu.org/25035>.” so we can more
easily grep the git log.

> +       (modify-phases %standard-phases
> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             ;; Fix "ImportError: No module named _sysconfigdata_nd" where
> +             ;; Scribus checks PATH and eventually runs system's Python
> +             ;; instead of package's.
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (py2 (assoc-ref inputs "python")))
> +               (wrap-program (string-append out "/bin/scribus")
> +                 `("PATH" ":" prefix (,(string-append py2 "/bin")))))

Did you identify the part of the code that invokes “python”?  If so,
instead of adding a wrapper, we could patch that file to use the
absolute file name of “python”, which would be even better.

Anyway, congrats on finding out what was wrong!

Thanks,
Ludo’.




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 20 Nov 2017 17:27:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Mon, 20 Nov 2017 17:27:02 GMT) Full text and rfc822 format available.

Message #16 received at 29292-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 29292-done <at> debbugs.gnu.org
Subject: Re: [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
Date: Mon, 20 Nov 2017 18:26:14 +0100
Hello,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Please make it “Fixes <https://bugs.gnu.org/25035>.” so we can more
> easily grep the git log.

Fixed.

>> +       (modify-phases %standard-phases
>> +         (add-after 'install 'wrap-program
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             ;; Fix "ImportError: No module named _sysconfigdata_nd" where
>> +             ;; Scribus checks PATH and eventually runs system's Python
>> +             ;; instead of package's.
>> +             (let* ((out (assoc-ref outputs "out"))
>> +                    (py2 (assoc-ref inputs "python")))
>> +               (wrap-program (string-append out "/bin/scribus")
>> +                 `("PATH" ":" prefix (,(string-append py2 "/bin")))))
>
> Did you identify the part of the code that invokes “python”?  If so,
> instead of adding a wrapper, we could patch that file to use the
> absolute file name of “python”, which would be even better.

I know, but I couldn't find the culprit, unfortunately. It may be easier
for someone more knowledgeable in the Python world.

> Anyway, congrats on finding out what was wrong!

To be fair, the IRC crew did all the work.

I applied the patch. Thank you.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 19 Dec 2017 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.