diff mbox series

[bug#49329,v2,1/5] gnu: python2-renpy: Drop unused Ren'py sources.

Message ID 20210703092842.32189-1-leo.prikler@student.tugraz.at
State Accepted
Headers show
Series [bug#49329,v2,1/5] gnu: python2-renpy: Drop unused Ren'py sources. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Leo Prikler July 3, 2021, 9:28 a.m. UTC
These sources are written in Ren'py (the language) and thus not particularly
useful before renpy itself is built.  In particular, they serve no purpose
when installed without prior compilation.

* gnu/packages/game-development.scm (python2-renpy)[#:phases]<install>:
Drop installed "common" folder.
(renpy)[#:phases]<install>: Adjust comment accordingly.
---
0001 up to 0004 are identical to v1.

 gnu/packages/game-development.scm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

Comments

Christopher Marusich July 11, 2021, 4:52 a.m. UTC | #1
Leo Prikler <leo.prikler@student.tugraz.at> writes:

> These sources are written in Ren'py (the language) and thus not particularly
> useful before renpy itself is built.  In particular, they serve no purpose
> when installed without prior compilation.

Could we pre-compile those sources on installation, instead of deleting
the common directory?  I haven't used Ren'Py much (or at all in Guix),
so I don't really understand the purpose of the common directory.  I
could just be missing some context/info.

Other than that, this patch seems OK as far as I can tell.
Leo Prikler July 11, 2021, 7:03 a.m. UTC | #2
Am Samstag, den 10.07.2021, 21:52 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
> 
> > These sources are written in Ren'py (the language) and thus not
> > particularly
> > useful before renpy itself is built.  In particular, they serve no
> > purpose
> > when installed without prior compilation.
> 
> Could we pre-compile those sources on installation, instead of
> deleting
> the common directory?  I haven't used Ren'Py much (or at all in
> Guix),
> so I don't really understand the purpose of the common directory.  I
> could just be missing some context/info.
> 
> Other than that, this patch seems OK as far as I can tell.
You need Ren'py (as in the package you're currently compiling) to
compile these sources.  These sources will get compiled just fine in
the renpy package given that we already have python2-renpy available by
then, so they are shipped as part of that instead of this package.

Regards,
Leo
Christopher Marusich July 15, 2021, 7:22 a.m. UTC | #3
Leo Prikler <leo.prikler@student.tugraz.at> writes:

> Am Samstag, den 10.07.2021, 21:52 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>> 
>> > These sources are written in Ren'py (the language) and thus not
>> > particularly
>> > useful before renpy itself is built.  In particular, they serve no
>> > purpose
>> > when installed without prior compilation.
>> 
>> Could we pre-compile those sources on installation, instead of
>> deleting
>> the common directory?  I haven't used Ren'Py much (or at all in
>> Guix),
>> so I don't really understand the purpose of the common directory.  I
>> could just be missing some context/info.
>> 
>> Other than that, this patch seems OK as far as I can tell.
> You need Ren'py (as in the package you're currently compiling) to
> compile these sources.  These sources will get compiled just fine in
> the renpy package given that we already have python2-renpy available by
> then, so they are shipped as part of that instead of this package.

OK, I think I understand.  This seems fine.
diff mbox series

Patch

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 9069b88d0c..22c44a585c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1230,7 +1230,8 @@  developed mainly for Ren'py.")
                (with-directory-excursion "module"
                  (apply (assoc-ref %standard-phases 'install) args))
                (copy-recursively "renpy"
-                                 (string-append out site "/renpy")))
+                                 (string-append out site "/renpy"))
+               (delete-file-recursively (string-append out site "/renpy/common")))
              #t)))))
     (inputs
      `(("ffmpeg" ,ffmpeg)
@@ -1304,11 +1305,14 @@  modules of Ren'py.")
              ;; After finishing this step, "out" will have the following:
              ;; |-- bin/renpy
              ;; `-- share/renpy ; i.e. path_to_renpy_base()
-             ;;     `-- common
+             ;;     |-- common
+             ;;     `-- gui
              ;;
-             ;; Note that common is also a de facto unused directory in
-             ;; python2-renpy. On other systems, renpy_base would point to
-             ;; site-packages or even somewhere in /opt.
+             ;; Note that common shares the source files that would be installed
+             ;; by python2-renpy (which are instead deleted from that package),
+             ;; but also contains their byte-compiled versions.
+             ;; On other systems, renpy_base would point to site-packages or
+             ;; even somewhere in /opt.
              ;; The former approach is not as straightforward as it seems
              ;; -- it causes renpy to load files twice for some weird reason --
              ;; and the latter is impossible on Guix. Hence the detour through
@@ -1319,9 +1323,11 @@  modules of Ren'py.")
              ;; well. This differs from the traditional layout, which is
              ;; roughly the following:
              ;; `-- Super Awesome Game
-             ;;     |-- game      ; <- the folder we actually want
-             ;;     |-- lib       ; compiled renpy module and dependencies
-             ;;     |-- renpy     ; Ren'py python code (source + compiled)
+             ;;     |-- game       ; <- the folder we actually want
+             ;;     |-- lib        ; compiled renpy module and dependencies
+             ;;     |-- renpy      ; yet another copy of Ren'py's code
+             ;;     |   |-- common ; the common folder from above
+             ;;     |   `-- ...    ; Python code (source + compiled)
              ;;     |-- Super Awesome Game.py
              ;;     `-- Super Awesome Game.sh
              (let* ((out (assoc-ref outputs "out"))