all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: 49329@debbugs.gnu.org
Subject: [bug#49329] [PATCH 00/??] Improve Ren'py package
Date: Sun, 11 Jul 2021 08:58:51 +0200	[thread overview]
Message-ID: <235456dfa9f27b6a3b612fb0a8d6e86aa4b5d362.camel@student.tugraz.at> (raw)
In-Reply-To: <8735sl5uu8.fsf_-_@gmail.com>

Am Samstag, den 10.07.2021, 21:37 -0700 schrieb Chris Marusich:
> 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?
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 





  reply	other threads:[~2021-07-11  6:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02 12:39 [bug#49329] [PATCH 00/??] Improve Ren'py package Leo Prikler
2021-07-02 13:58 ` [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py sources Leo Prikler
2021-07-02 13:58   ` [bug#49329] [PATCH 2/4] gnu: python2-renpy: Update description Leo Prikler
2021-07-02 13:58   ` [bug#49329] [PATCH 3/4] gnu: python2-renpy: Correct inputs Leo Prikler
2021-07-02 13:58   ` [bug#49329] [PATCH 4/4] gnu: renpy: " Leo Prikler
2021-07-03  7:50   ` [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py sources zimoun
2021-07-03  8:35     ` Leo Prikler
2021-07-11  3:50       ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-11  8:28       ` [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py sources zimoun
2021-07-11  9:53         ` Leo Prikler
2021-07-15  6:47           ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-03  9:28 ` [bug#49329] [PATCH v2 1/5] gnu: python2-renpy: Drop unused Ren'py sources Leo Prikler
2021-07-03  9:28   ` [bug#49329] [PATCH v2 2/5] gnu: python2-renpy: Update description Leo Prikler
2021-07-11  4:53     ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-11  7:09       ` Leo Prikler
2021-07-15  6:48         ` Chris Marusich
2021-07-03  9:28   ` [bug#49329] [PATCH v2 3/5] gnu: python2-renpy: Correct inputs Leo Prikler
2021-07-11  4:55     ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-03  9:28   ` [bug#49329] [PATCH v2 4/5] gnu: renpy: Correct inputs Leo Prikler
2021-07-11  4:37     ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-11  6:58       ` Leo Prikler [this message]
2021-07-03  9:28   ` [bug#49329] [PATCH v2 5/5] gnu: Add python-pygame-sdl2 Leo Prikler
2021-07-11  4:44     ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-11  7:00       ` Leo Prikler
2021-07-15  7:21         ` Chris Marusich
2021-07-15 11:46           ` bug#49329: " Leo Prikler
2021-07-11  4:52   ` [bug#49329] " Chris Marusich
2021-07-11  7:03     ` Leo Prikler
2021-07-15  7:22       ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=235456dfa9f27b6a3b612fb0a8d6e86aa4b5d362.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=49329@debbugs.gnu.org \
    --cc=cmmarusich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.