* [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
@ 2017-11-13 23:44 Nicolas Goaziou
2017-11-14 0:07 ` Adonay Felipe Nogueira
2017-11-16 9:58 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2017-11-13 23:44 UTC (permalink / raw)
To: 29292
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
Hello,
This patch is an attempt to fix bug #25035, thanks to the Guix people on
IRC.
Regards,
--
Nicolas Goaziou 0x80A93738
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Fix Scribus --]
[-- Type: text/x-diff, Size: 1485 bytes --]
From 445ce30a90250d6c584a98ac60fddb4b96f1a3a7 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
2017-11-13 23:44 [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd Nicolas Goaziou
@ 2017-11-14 0:07 ` Adonay Felipe Nogueira
2017-11-16 9:58 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Adonay Felipe Nogueira @ 2017-11-14 0:07 UTC (permalink / raw)
To: 29292
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@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@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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd
2017-11-13 23:44 [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd Nicolas Goaziou
2017-11-14 0:07 ` Adonay Felipe Nogueira
@ 2017-11-16 9:58 ` Ludovic Courtès
2017-11-20 17:26 ` bug#29292: " Nicolas Goaziou
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-11-16 9:58 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 29292
Hi Nicolas,
Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>>From 445ce30a90250d6c584a98ac60fddb4b96f1a3a7 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou <mail@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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#29292: [PATCH] Scribus: Fix No module named _sysconfigdata_nd
2017-11-16 9:58 ` Ludovic Courtès
@ 2017-11-20 17:26 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2017-11-20 17:26 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29292-done
Hello,
ludo@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-20 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13 23:44 [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd Nicolas Goaziou
2017-11-14 0:07 ` Adonay Felipe Nogueira
2017-11-16 9:58 ` Ludovic Courtès
2017-11-20 17:26 ` bug#29292: " Nicolas Goaziou
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).