GNU bug report logs - #49329
[PATCH 00/??] Improve Ren'py package

Previous Next

Package: guix-patches;

Reported by: Leo Prikler <leo.prikler <at> student.tugraz.at>

Date: Fri, 2 Jul 2021 12:41:02 UTC

Severity: normal

Tags: patch

Done: Leo Prikler <leo.prikler <at> student.tugraz.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org
Subject: [bug#49329] [PATCH 00/??] Improve Ren'py package
Date: Sun, 11 Jul 2021 08:58:51 +0200
Am Samstag, den 10.07.2021, 21:37 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler <at> 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?
The reason is that I want to avoid having native-inputs in PYTHONPATH
(which the naïve getenv-based solution will always return).  For native
builds these currently can't be avoided even with the above snippet,
but for cross-builds and maybe future native-builds which separate
inputs and native-inputs, this ought to do "the correct thing".

delete-duplicates is more of a style thing than anything else, in my
personal opinion the wrapper script is more readable with it.

Regards,
Leo 





This bug report was last modified 4 years and 39 days ago.

Previous Next


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