guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49329] [PATCH 00/??] Improve Ren'py package


From: Chris Marusich
Subject: [bug#49329] [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:37:51 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> diff --git a/gnu/packages/game-development.scm 
> b/gnu/packages/game-development.scm
> [...]
>               #t))
>           (replace 'wrap
>             (lambda* (#:key inputs outputs #:allow-other-keys)
> -             (wrap-program (string-append (assoc-ref outputs "out")
> -                                          "/bin/renpy")
> -               `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
> -             #t)))))
> +             (let ((out (assoc-ref outputs "out"))
> +                   (site (string-append "/lib/python"
> +                                        (python-version
> +                                         (assoc-ref inputs "python"))
> +                                        "/site-packages")))
> +               (wrap-program (string-append out "/bin/renpy")
> +                 `("PYTHONPATH" =
> +                   (,@(delete-duplicates
> +                       (map
> +                        (lambda (store-path)
> +                          (string-append store-path site))
> +                        (cons (assoc-ref outputs "out")
> +                              (map cdr
> +                                   (filter
> +                                    (lambda (input)
> +                                      (string-prefix? "python2" (car input)))
> +                                    inputs))))))))
> +               #t))))))

What's the motivation for doing this?  It seems like the new version
deletes duplicates, but has the downside of being a little more
complicated and relying on the package names to determine what goes into
the PYTHONPATH.

Duplicate entries in the PYTHONPATH should not be a problem for
correctness or performance, right?  I feel like this section was perhaps
better the way it was originally.  Am I missing something?

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]