Subject: Re: [bug#29292] [PATCH] Scribus: Fix No module named _sysconfigdata_nd

From: Nicolas Goaziou <[email-masked]>
Date: Mon, 20 Nov 2017 18:26:14 +0100

Hello,

[email-masked] (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