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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49329 in the body.
You can then email your comments to 49329 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Fri, 02 Jul 2021 12:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 02 Jul 2021 12:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: guix-patches <at> gnu.org
Subject: [PATCH 00/??] Improve Ren'py package
Date: Fri, 02 Jul 2021 14:39:52 +0200
Hi Guix,

Being one of the first package I've ever contributed to Guix, the renpy
package contains a few mistakes, some of which were fixed over time,
but many of which still remain.  This series aims to address a few of
them.  At the time of writing, I haven't yet finished it, I just want
to claim the bug ID, so that I can 'git send-email' later today.

Thanks





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Fri, 02 Jul 2021 13:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: python2-renpy: Update description.
Date: Fri,  2 Jul 2021 15:58:16 +0200
* gnu/packages/game-development.scm (python2-renpy)[description]: Mention,
that it's only used for bootstrapping renpy.
---
 gnu/packages/game-development.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 22c44a585c..9b231ad333 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1250,8 +1250,10 @@ developed mainly for Ren'py.")
        ("xdg-utils" ,xdg-utils)))
     (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
-    (description "This package contains the shared libraries and Python
-modules of Ren'py.")
+    (description "This package contains the shared libraries and Python modules
+of Ren'py.  While functional, they are not meaningful on their own without
+the launcher and common Ren'py code provided by the @code{renpy} package and
+are only used to bootstrap it.")
     (license license:expat)))
 
 (define-public renpy
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Fri, 02 Jul 2021 13:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: python2-renpy: Correct inputs.
Date: Fri,  2 Jul 2021 15:58:17 +0200
* gnu/packages/game-development.scm (python2-renpy)[#:phases]<fix-commands>:
Search for ‘xdg-open’ in inputs.
<set-build-vars>: Search for ‘cython’ in native-inputs.
[native-inputs]: Move ‘xdg-utils’ from here…
[inputs]: … to here.
---
 gnu/packages/game-development.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 9b231ad333..7c5d45c412 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1186,10 +1186,11 @@ developed mainly for Ren'py.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-commands
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "renpy/editor.py"
                (("xdg-open")
-                (which "xdg-open")))
+                (string-append (assoc-ref inputs "xdg-utils")
+                               "/bin/xdg-open")))
              #t))
          (add-after 'unpack 'fix-include-paths
            (lambda* (#:key inputs #:allow-other-keys)
@@ -1199,9 +1200,10 @@ developed mainly for Ren'py.")
                                "/include/fribidi")))
              #t))
          (add-after 'set-paths 'set-build-vars
-           (lambda* (#:key inputs #:allow-other-keys)
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
              (setenv "RENPY_CYTHON"
-                     (string-append (assoc-ref inputs "python2-cython")
+                     (string-append (assoc-ref (or native-inputs inputs)
+                                               "python2-cython")
                                     "/bin/cython"))
              (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":"))
              #t))
@@ -1240,14 +1242,14 @@ developed mainly for Ren'py.")
        ("glew" ,glew)
        ("libpng" ,libpng)
        ("sdl-union"
-        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
+        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("xdg-utils" ,xdg-utils)))
     (propagated-inputs
      `(("python2-future" ,python2-future)
        ("python2-pygame" ,python2-pygame-sdl2)))
     (native-inputs
      `(("gcc" ,gcc-8) ; for const variables as initializer elements
-       ("python2-cython" ,python2-cython)
-       ("xdg-utils" ,xdg-utils)))
+       ("python2-cython" ,python2-cython)))
     (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
     (description "This package contains the shared libraries and Python modules
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Fri, 02 Jul 2021 13:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py sources.
Date: Fri,  2 Jul 2021 15:58:15 +0200
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.
---
 gnu/packages/game-development.scm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

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"))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Fri, 02 Jul 2021 13:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: renpy: Correct inputs.
Date: Fri,  2 Jul 2021 15:58:18 +0200
* gnu/packages/game-development.scm (renpy)[#:modules]: Add SRFI-1.
[#:imported-modules]: Likewise.
[#:phases]<fix-commands>: Search for ‘python2’ and ‘xdg-open’ in inputs.
<start-xserver>: Search for ‘xorg-server’ in native-inputs.
<install>: Search for ‘python2’ in inputs.
<wrap>: Search for python dependencies in inputs.
[inputs]: Add python2, drop python2-pygame (already propagated by
python2-renpy). Move xorg-server from here…
[native-inputs]: … to here.
[propagated-inputs]: Empty.
---
 gnu/packages/game-development.scm | 54 +++++++++++++++++++++++--------
 1 file changed, 40 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 7c5d45c412..5d5fa5cf8b 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1266,15 +1266,22 @@ are only used to bootstrap it.")
     (arguments
      `(#:tests? #f ; see python2-renpy
        #:python ,python-2
+       #:modules ((srfi srfi-1)
+                  (guix build python-build-system)
+                  (guix build utils))
+       #:imported-modules ((srfi srfi-1) ,@%python-build-system-modules)
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-commands
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "launcher/game/choose_directory.rpy"
-               (("/usr/bin/python") (which "python2")))
+               (("/usr/bin/python")
+                (string-append (assoc-ref inputs "python2")
+                               "/bin/python2")))
              (substitute* "launcher/game/front_page.rpy"
                (("xdg-open")
-                (which "xdg-open")))
+                (string-append (assoc-ref inputs "xdg-utils")
+                               "/bin/xdg-open")))
              (substitute* "launcher/game/project.rpy"
                (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]")
                 (string-append "cmd = [ \"" (assoc-ref outputs "out")
@@ -1291,8 +1298,9 @@ are only used to bootstrap it.")
                ((", \"game\",") ","))
              #t))
          (add-before 'build 'start-xserver
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((xorg-server (assoc-ref inputs "xorg-server")))
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             (let ((xorg-server (assoc-ref (or native-inputs inputs)
+                                           "xorg-server")))
                (setenv "HOME" (getcwd))
                (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
                (setenv "DISPLAY" ":1")
@@ -1344,7 +1352,8 @@ are only used to bootstrap it.")
 
                (call-with-output-file bin/renpy
                  (lambda (port)
-                   (format port "#!~a~%" (which "python2"))
+                   (format port "#!~a/bin/python2~%"
+                           (assoc-ref inputs "python2"))
                    (format port "
 from __future__ import print_function
 
@@ -1433,15 +1442,32 @@ if __name__ == \"__main__\":
              #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))))))
     (inputs
-     `(("python2-tkinter" ,python-2 "tk")
-       ("python2-pygame" ,python2-pygame-sdl2)
-       ("python2-renpy" ,python2-renpy)
-       ("xorg-server" ,xorg-server)))
+     `(("python2-renpy" ,python2-renpy)
+       ("python2-tkinter" ,python-2 "tk")
+       ("python2" ,python-2) ; for ‘fix-commands’ and ‘wrap’
+       ("xdg-utils" ,xdg-utils)))
+    (propagated-inputs '())
+    (native-inputs
+     `(("xorg-server" ,xorg-server-for-tests)))
     (outputs
      (list "out" "tutorial" "the-question"))
     (home-page "https://www.renpy.org/")
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 07:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>, 49329 <at> debbugs.gnu.org
Subject: Re: [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py
 sources.
Date: Sat, 03 Jul 2021 09:50:50 +0200
Hi Leo,

Just a general comment about Python 2. :-)

On Fri, 02 Jul 2021 at 15:58, Leo Prikler <leo.prikler <at> student.tugraz.at> wrote:

> * gnu/packages/game-development.scm (python2-renpy)[#:phases]<install>:

Is Ren’py working only with Python 2?  Or does it also work with Python
3?  Because Python 2 is EOL, officially since January 2020, if Ren’py is
Python 2 only, maybe it could go to the channel guix-past [1], soon or
later. :-) WDYT?

1: <https://gitlab.inria.fr/guix-hpc/guix-past>

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 08:36:01 GMT) Full text and rfc822 format available.

Message #23 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: zimoun <zimon.toutoune <at> gmail.com>, 49329 <at> debbugs.gnu.org
Subject: Re: [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py
 sources.
Date: Sat, 03 Jul 2021 10:35:05 +0200
Hi simon,

Am Samstag, den 03.07.2021, 09:50 +0200 schrieb zimoun:
> Hi Leo,
> 
> Just a general comment about Python 2. :-)
> 
> On Fri, 02 Jul 2021 at 15:58, Leo Prikler <
> leo.prikler <at> student.tugraz.at> wrote:
> 
> > * gnu/packages/game-development.scm (python2-
> > renpy)[#:phases]<install>:
> 
> Is Ren’py working only with Python 2?  Or does it also work with
> Python
> 3?  Because Python 2 is EOL, officially since January 2020, if Ren’py
> is
> Python 2 only, maybe it could go to the channel guix-past [1], soon
> or
> later. :-) WDYT?
> 
> 1: <https://gitlab.inria.fr/guix-hpc/guix-past>
Ren'py does have a Python 3 compatibility layer, but I haven't gone
around to doing a pure Python 3 build yet.  I imagine it could also be
used with Tauthon[1], which was suggested to be used as python2
replacement in places where projects can't trivially be ported to the
newer python 3 stuffs.

Furthermore, Ren'py 8 will use Python 3 as a base.  I don't know if
it'll be backwards compatible with Ren'py 7 then – probably not.  If
not, moving Ren'py 7 to Guix-Past sounds like a good idea.

I must admit, I haven't been following the Python 2 removal plan too
closely.  Is it already time to move working leaf packages?

Cheers,
Leo

[1] https://github.com/naftaliharris/tauthon





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 09:31:01 GMT) Full text and rfc822 format available.

Message #26 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH v2 1/5] gnu: python2-renpy: Drop unused Ren'py sources.
Date: Sat,  3 Jul 2021 11:28:39 +0200
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(-)

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"))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 09:31:02 GMT) Full text and rfc822 format available.

Message #29 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH v2 2/5] gnu: python2-renpy: Update description.
Date: Sat,  3 Jul 2021 11:28:40 +0200
* gnu/packages/game-development.scm (python2-renpy)[description]: Mention,
that it's only used for bootstrapping renpy.
---
 gnu/packages/game-development.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 22c44a585c..9b231ad333 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1250,8 +1250,10 @@ developed mainly for Ren'py.")
        ("xdg-utils" ,xdg-utils)))
     (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
-    (description "This package contains the shared libraries and Python
-modules of Ren'py.")
+    (description "This package contains the shared libraries and Python modules
+of Ren'py.  While functional, they are not meaningful on their own without
+the launcher and common Ren'py code provided by the @code{renpy} package and
+are only used to bootstrap it.")
     (license license:expat)))
 
 (define-public renpy
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 09:31:02 GMT) Full text and rfc822 format available.

Message #32 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH v2 3/5] gnu: python2-renpy: Correct inputs.
Date: Sat,  3 Jul 2021 11:28:41 +0200
* gnu/packages/game-development.scm (python2-renpy)[#:phases]<fix-commands>:
Search for ‘xdg-open’ in inputs.
<set-build-vars>: Search for ‘cython’ in native-inputs.
[native-inputs]: Move ‘xdg-utils’ from here…
[inputs]: … to here.
---
 gnu/packages/game-development.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 9b231ad333..7c5d45c412 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1186,10 +1186,11 @@ developed mainly for Ren'py.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-commands
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "renpy/editor.py"
                (("xdg-open")
-                (which "xdg-open")))
+                (string-append (assoc-ref inputs "xdg-utils")
+                               "/bin/xdg-open")))
              #t))
          (add-after 'unpack 'fix-include-paths
            (lambda* (#:key inputs #:allow-other-keys)
@@ -1199,9 +1200,10 @@ developed mainly for Ren'py.")
                                "/include/fribidi")))
              #t))
          (add-after 'set-paths 'set-build-vars
-           (lambda* (#:key inputs #:allow-other-keys)
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
              (setenv "RENPY_CYTHON"
-                     (string-append (assoc-ref inputs "python2-cython")
+                     (string-append (assoc-ref (or native-inputs inputs)
+                                               "python2-cython")
                                     "/bin/cython"))
              (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":"))
              #t))
@@ -1240,14 +1242,14 @@ developed mainly for Ren'py.")
        ("glew" ,glew)
        ("libpng" ,libpng)
        ("sdl-union"
-        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
+        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("xdg-utils" ,xdg-utils)))
     (propagated-inputs
      `(("python2-future" ,python2-future)
        ("python2-pygame" ,python2-pygame-sdl2)))
     (native-inputs
      `(("gcc" ,gcc-8) ; for const variables as initializer elements
-       ("python2-cython" ,python2-cython)
-       ("xdg-utils" ,xdg-utils)))
+       ("python2-cython" ,python2-cython)))
     (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
     (description "This package contains the shared libraries and Python modules
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 09:31:02 GMT) Full text and rfc822 format available.

Message #35 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH v2 4/5] gnu: renpy: Correct inputs.
Date: Sat,  3 Jul 2021 11:28:42 +0200
* gnu/packages/game-development.scm (renpy)[#:modules]: Add SRFI-1.
[#:imported-modules]: Likewise.
[#:phases]<fix-commands>: Search for ‘python2’ and ‘xdg-open’ in inputs.
<start-xserver>: Search for ‘xorg-server’ in native-inputs.
<install>: Search for ‘python2’ in inputs.
<wrap>: Search for python dependencies in inputs.
[inputs]: Add python2, drop python2-pygame (already propagated by
python2-renpy). Move xorg-server from here…
[native-inputs]: … to here.
[propagated-inputs]: Empty.
---
 gnu/packages/game-development.scm | 54 +++++++++++++++++++++++--------
 1 file changed, 40 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 7c5d45c412..5d5fa5cf8b 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1266,15 +1266,22 @@ are only used to bootstrap it.")
     (arguments
      `(#:tests? #f ; see python2-renpy
        #:python ,python-2
+       #:modules ((srfi srfi-1)
+                  (guix build python-build-system)
+                  (guix build utils))
+       #:imported-modules ((srfi srfi-1) ,@%python-build-system-modules)
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-commands
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "launcher/game/choose_directory.rpy"
-               (("/usr/bin/python") (which "python2")))
+               (("/usr/bin/python")
+                (string-append (assoc-ref inputs "python2")
+                               "/bin/python2")))
              (substitute* "launcher/game/front_page.rpy"
                (("xdg-open")
-                (which "xdg-open")))
+                (string-append (assoc-ref inputs "xdg-utils")
+                               "/bin/xdg-open")))
              (substitute* "launcher/game/project.rpy"
                (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]")
                 (string-append "cmd = [ \"" (assoc-ref outputs "out")
@@ -1291,8 +1298,9 @@ are only used to bootstrap it.")
                ((", \"game\",") ","))
              #t))
          (add-before 'build 'start-xserver
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((xorg-server (assoc-ref inputs "xorg-server")))
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             (let ((xorg-server (assoc-ref (or native-inputs inputs)
+                                           "xorg-server")))
                (setenv "HOME" (getcwd))
                (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
                (setenv "DISPLAY" ":1")
@@ -1344,7 +1352,8 @@ are only used to bootstrap it.")
 
                (call-with-output-file bin/renpy
                  (lambda (port)
-                   (format port "#!~a~%" (which "python2"))
+                   (format port "#!~a/bin/python2~%"
+                           (assoc-ref inputs "python2"))
                    (format port "
 from __future__ import print_function
 
@@ -1433,15 +1442,32 @@ if __name__ == \"__main__\":
              #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))))))
     (inputs
-     `(("python2-tkinter" ,python-2 "tk")
-       ("python2-pygame" ,python2-pygame-sdl2)
-       ("python2-renpy" ,python2-renpy)
-       ("xorg-server" ,xorg-server)))
+     `(("python2-renpy" ,python2-renpy)
+       ("python2-tkinter" ,python-2 "tk")
+       ("python2" ,python-2) ; for ‘fix-commands’ and ‘wrap’
+       ("xdg-utils" ,xdg-utils)))
+    (propagated-inputs '())
+    (native-inputs
+     `(("xorg-server" ,xorg-server-for-tests)))
     (outputs
      (list "out" "tutorial" "the-question"))
     (home-page "https://www.renpy.org/")
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sat, 03 Jul 2021 09:31:03 GMT) Full text and rfc822 format available.

Message #38 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: 49329 <at> debbugs.gnu.org
Subject: [PATCH v2 5/5] gnu: Add python-pygame-sdl2.
Date: Sat,  3 Jul 2021 11:28:43 +0200
* gnu/packages/game-development.scm (python-pygame-sdl2): New variable.
Inherit package definition from previous python2-pygame-sdl2, with the
following additions:
[source]: Also drop “gen3” in snippet.
[arguments]: Drop #:python.
[native-inputs]: Use ‘python-cython’ instead of ‘python2-cython’.
(python2-pygame-sdl2): Define in terms of python-pygame-sdl2.
---
 gnu/packages/game-development.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 5d5fa5cf8b..e1593c0f82 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1106,12 +1106,12 @@ to create fully featured games and multimedia programs in the python language.")
 (define-public python2-pygame
   (package-with-python2 python-pygame))
 
-(define-public python2-pygame-sdl2
+(define-public python-pygame-sdl2
   (let ((real-version "2.1.0")
         (renpy-version "7.4.6"))
     (package
-      (inherit python2-pygame)
-      (name "python2-pygame-sdl2")
+      (inherit python-pygame)
+      (name "python-pygame-sdl2")
       (version (string-append real-version "-for-renpy-" renpy-version))
       (source
        (origin
@@ -1124,12 +1124,12 @@ to create fully featured games and multimedia programs in the python language.")
           '(begin
              ;; drop generated sources
              (delete-file-recursively "gen")
+             (delete-file-recursively "gen3")
              (delete-file-recursively "gen-static")
              #t))))
       (build-system python-build-system)
       (arguments
        `(#:tests? #f                ; tests require pygame to be installed first
-         #:python ,python-2
          #:phases
          (modify-phases %standard-phases
            (add-after 'set-paths 'set-sdl-vars
@@ -1149,7 +1149,7 @@ to create fully featured games and multimedia programs in the python language.")
        `(("sdl-union"
           ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
       (native-inputs
-       `(("python2-cython" ,python2-cython)))
+       `(("python-cython" ,python-cython)))
       (home-page "https://www.renpy.org/")
       (synopsis "Reimplementation of the Pygame API using SDL2")
       (description "Pygame_SDL2 reimplements the Pygame API using SDL2,
@@ -1158,6 +1158,9 @@ While it aims to be used as a drop-in replacement, it appears to be
 developed mainly for Ren'py.")
       (license (list license:lgpl2.1 license:zlib)))))
 
+(define-public python2-pygame-sdl2
+  (package-with-python2 python-pygame-sdl2))
+
 (define-public python2-renpy
   (package
     (name "python2-renpy")
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 03:51:02 GMT) Full text and rfc822 format available.

Message #41 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org, zimoun <zimon.toutoune <at> gmail.com>
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 20:50:43 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> Hi simon,
>
> Am Samstag, den 03.07.2021, 09:50 +0200 schrieb zimoun:
>> Hi Leo,
>> 
>> Just a general comment about Python 2. :-)
>> 
>> On Fri, 02 Jul 2021 at 15:58, Leo Prikler <
>> leo.prikler <at> student.tugraz.at> wrote:
>> 
>> > * gnu/packages/game-development.scm (python2-
>> > renpy)[#:phases]<install>:
>> 
>> Is Ren’py working only with Python 2?  Or does it also work with
>> Python
>> 3?  Because Python 2 is EOL, officially since January 2020, if Ren’py
>> is
>> Python 2 only, maybe it could go to the channel guix-past [1], soon
>> or
>> later. :-) WDYT?
>> 
>> 1: <https://gitlab.inria.fr/guix-hpc/guix-past>
> Ren'py does have a Python 3 compatibility layer, but I haven't gone
> around to doing a pure Python 3 build yet.  I imagine it could also be
> used with Tauthon[1], which was suggested to be used as python2
> replacement in places where projects can't trivially be ported to the
> newer python 3 stuffs.
>
> Furthermore, Ren'py 8 will use Python 3 as a base.  I don't know if
> it'll be backwards compatible with Ren'py 7 then – probably not.  If
> not, moving Ren'py 7 to Guix-Past sounds like a good idea.
>
> I must admit, I haven't been following the Python 2 removal plan too
> closely.  Is it already time to move working leaf packages?

It sounds like the plan is in flux, but essentially yes:

https://lists.gnu.org/archive/html/guix-devel/2021-06/msg00179.html

It seems to me that Python 2 will likely remain in Guix for some time,
but the various Python 2 packages will over time become hidden or
removed in favor of their Python 3 variants.

The Ren'Py plan is outlined here (I think?):

https://github.com/renpy/renpy/issues/2003

It sounds like it's going to be a slow (years) process for them.  Other
issues can be found here:

https://github.com/renpy/renpy/issues?q=is%3Aissue+is%3Aopen+%22python+3%22

Personally, I don't think it would be bad to add Ren'Py 7 to Guix
proper, even if it still depends on Python 2 and Python 2 libraries.
Until upstream supports Python 3, there is no other option, and for now
it sounds like we are not planning on removing all of the Python 2
libraries just yet.

If the maintenance burden becomes too great or we decide to eliminate
more Python 2 dependencies from Guix proper, we can always drop Ren'Py 7
or move it to Guix-Past along with its dependencies.  Hopefully Ren'Py 8
will bring Python 3 support sooner sooner than that, though, and we can
just drop Ren'Py 7 in favor of Ren'Py 8 at that time.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 04:39:01 GMT) Full text and rfc822 format available.

Message #44 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:37:51 -0700
[Message part 1 (text/plain, inline)]
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?

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 04:45:02 GMT) Full text and rfc822 format available.

Message #47 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:44:29 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> * gnu/packages/game-development.scm (python-pygame-sdl2): New variable.
> Inherit package definition from previous python2-pygame-sdl2, with the
> following additions:

Actually, it inherits from python-pygame, right?

> [source]: Also drop “gen3” in snippet.
> [arguments]: Drop #:python.
> [native-inputs]: Use ‘python-cython’ instead of ‘python2-cython’.
> (python2-pygame-sdl2): Define in terms of python-pygame-sdl2.

LGTM.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 04:53:01 GMT) Full text and rfc822 format available.

Message #50 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:52:33 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> 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.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 04:54:02 GMT) Full text and rfc822 format available.

Message #53 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:53:40 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> * gnu/packages/game-development.scm (python2-renpy)[description]: Mention,
> that it's only used for bootstrapping renpy.
> ---
>  gnu/packages/game-development.scm | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index 22c44a585c..9b231ad333 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -1250,8 +1250,10 @@ developed mainly for Ren'py.")
>         ("xdg-utils" ,xdg-utils)))
>      (home-page "https://www.renpy.org/")
>      (synopsis "Ren'py python module")
> -    (description "This package contains the shared libraries and Python
> -modules of Ren'py.")
> +    (description "This package contains the shared libraries and Python modules
> +of Ren'py.  While functional, they are not meaningful on their own without
> +the launcher and common Ren'py code provided by the @code{renpy} package and
> +are only used to bootstrap it.")
>      (license license:expat)))
>  
>  (define-public renpy

LGTM.  If this isn't meant to be installed by users, should it be
non-public or perhaps hidden?

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 04:56:02 GMT) Full text and rfc822 format available.

Message #56 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sat, 10 Jul 2021 21:55:02 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> * gnu/packages/game-development.scm (python2-renpy)[#:phases]<fix-commands>:
> Search for ‘xdg-open’ in inputs.
> <set-build-vars>: Search for ‘cython’ in native-inputs.
> [native-inputs]: Move ‘xdg-utils’ from here…
> [inputs]: … to here.

LGTM.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 06:59:01 GMT) Full text and rfc822 format available.

Message #59 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: 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 





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 07:01:01 GMT) Full text and rfc822 format available.

Message #62 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sun, 11 Jul 2021 09:00:46 +0200
Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> 
> > * gnu/packages/game-development.scm (python-pygame-sdl2): New
> > variable.
> > Inherit package definition from previous python2-pygame-sdl2, with
> > the
> > following additions:
> 
> Actually, it inherits from python-pygame, right?
"Inherit" as in "use the code that was originally written for python2-
pygame-sdl2".  Did the inherit field change with this patch?  If so, I
should reflect it in the commit message.

> > [source]: Also drop “gen3” in snippet.
> > [arguments]: Drop #:python.
> > [native-inputs]: Use ‘python-cython’ instead of ‘python2-cython’.
> > (python2-pygame-sdl2): Define in terms of python-pygame-sdl2.
> 
> LGTM.
> 





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 07:04:02 GMT) Full text and rfc822 format available.

Message #65 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sun, 11 Jul 2021 09:03:11 +0200
Am Samstag, den 10.07.2021, 21:52 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 07:10:01 GMT) Full text and rfc822 format available.

Message #68 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Sun, 11 Jul 2021 09:09:50 +0200
Am Samstag, den 10.07.2021, 21:53 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> 
> > * gnu/packages/game-development.scm (python2-renpy)[description]:
> > Mention,
> > that it's only used for bootstrapping renpy.
> > ---
> >  gnu/packages/game-development.scm | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-
> > development.scm
> > index 22c44a585c..9b231ad333 100644
> > --- a/gnu/packages/game-development.scm
> > +++ b/gnu/packages/game-development.scm
> > @@ -1250,8 +1250,10 @@ developed mainly for Ren'py.")
> >         ("xdg-utils" ,xdg-utils)))
> >      (home-page "https://www.renpy.org/")
> >      (synopsis "Ren'py python module")
> > -    (description "This package contains the shared libraries and
> > Python
> > -modules of Ren'py.")
> > +    (description "This package contains the shared libraries and
> > Python modules
> > +of Ren'py.  While functional, they are not meaningful on their own
> > without
> > +the launcher and common Ren'py code provided by the @code{renpy}
> > package and
> > +are only used to bootstrap it.")
> >      (license license:expat)))
> >  
> >  (define-public renpy
> 
> LGTM.  If this isn't meant to be installed by users, should it be
> non-public or perhaps hidden?
Good point, but I don't think users will accidentally install it like
they do with gcc.  This description was written to address a point made
by Ludovic in IRC concerning the package's lack of one.  Having the
package publicly exported also makes my own life easier when updating
the recipe.  Last, but not least, these are functional modules and
could be used to develop code, that depends on Ren'py's internals, but
none of the "common" renpy stuff (or the common renpy stuff could
otherwise be extracted from the renpy package and changed to the
developer's desires).

Regards,
Leo





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 08:42:01 GMT) Full text and rfc822 format available.

Message #71 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>, 49329 <at> debbugs.gnu.org
Subject: Re: [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py
 sources.
Date: Sun, 11 Jul 2021 10:28:05 +0200
Hi Leo,

On Sat, 03 Jul 2021 at 10:35, Leo Prikler <leo.prikler <at> student.tugraz.at> wrote:

> I must admit, I haven't been following the Python 2 removal plan too
> closely.  Is it already time to move working leaf packages?

The Python EOL is January, 1rst 2020 [1].  So now, we are 1.5 years
ahead, so yes it seems already time to cook a plan. :-)

However, there is no consensus about such plan. ;-)  Some related
discussions:

2018-12: <https://yhetil.org/guix/20181226093812.GR2581 <at> macbook41/>
2019-10: <https://yhetil.org/guix/CAJ3okZ33HsXxgVgK3XyVHvYUfDUrbcwBnOn7FC6=3AG_YvAUbQ <at> mail.gmail.com/>
2019-11: <http://issues.guix.gnu.org/issue/38420>  Failed attempt to cook something
2021-01: <https://yhetil.org/guix/86pn1pgf7z.fsf <at> gmail.com/>

From my understanding, the “implemented” plan is described by Maxim
here:

   <https://yhetil.org/guix/87pn1oxv0m.fsf <at> gmail.com/>

I just want to point that it is less work to transfer a functional and
supported by upstream package than to transfer a package starting to
have issues.  Other said, I think it is easier to find motivation to do
the transfer for this previous case than to do some “janitor” work
later.  For what my opinion is worth. :-)

About Ren’Py 7, I do not have an opinion.  Yeah, waiting Ren’Py 8 seems
The Right Thing™ to do. :-)

Hope that helps,
simon

1: <https://www.python.org/doc/sunset-python-2/>




Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Sun, 11 Jul 2021 09:54:02 GMT) Full text and rfc822 format available.

Message #74 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: zimoun <zimon.toutoune <at> gmail.com>, 49329 <at> debbugs.gnu.org
Subject: Re: [bug#49329] [PATCH 1/4] gnu: python2-renpy: Drop unused Ren'py
 sources.
Date: Sun, 11 Jul 2021 11:53:02 +0200
Hi simon,

Am Sonntag, den 11.07.2021, 10:28 +0200 schrieb zimoun:
> Hi Leo,
> 
> On Sat, 03 Jul 2021 at 10:35, Leo Prikler <
> leo.prikler <at> student.tugraz.at> wrote:
> 
> > I must admit, I haven't been following the Python 2 removal plan
> > too
> > closely.  Is it already time to move working leaf packages?
> 
> The Python EOL is January, 1rst 2020 [1].  So now, we are 1.5 years
> ahead, so yes it seems already time to cook a plan. :-)
> 
> However, there is no consensus about such plan. ;-)  Some related
> discussions:
I know, but to be fair, we aren't the only ones behind on the Python
removal.  Python 2 is very much a zombie at this point, still kept
alive by other (mostly dead, but some live) projects that people rely
on for various reasons.

> 2018-12: <https://yhetil.org/guix/20181226093812.GR2581 <at> macbook41/>
> 2019-10: <
> https://yhetil.org/guix/CAJ3okZ33HsXxgVgK3XyVHvYUfDUrbcwBnOn7FC6=3AG_YvAUbQ <at> mail.gmail.com/
> >
> 2019-11: <http://issues.guix.gnu.org/issue/38420>  Failed attempt to
> cook something
> 2021-01: <https://yhetil.org/guix/86pn1pgf7z.fsf <at> gmail.com/>
> 
> From my understanding, the “implemented” plan is described by Maxim
> here:
> 
>    <https://yhetil.org/guix/87pn1oxv0m.fsf <at> gmail.com/>
Using this plan as a starting point, I think renpy counts as a non-
variant package relying on some python2-variant.

> I just want to point that it is less work to transfer a functional
> and
> supported by upstream package than to transfer a package starting to
> have issues.  Other said, I think it is easier to find motivation to
> do
> the transfer for this previous case than to do some “janitor” work
> later.  For what my opinion is worth. :-)
Fair enough, I could open up a merge request to have renpy in Guix Past
"ahead of time", but OTOH I feel like `guix time-machine` offers
similar benefits.  If we're going to *mirror* python packages, because
they will soon be broken, I think it would also be a good idea to start
from python2 instead of leaf packages.

Regards,
Leo





Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Thu, 15 Jul 2021 06:48:02 GMT) Full text and rfc822 format available.

Message #77 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org, zimoun <zimon.toutoune <at> gmail.com>
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Wed, 14 Jul 2021 23:47:32 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

>> From my understanding, the “implemented” plan is described by Maxim
>> here:
>> 
>>    <https://yhetil.org/guix/87pn1oxv0m.fsf <at> gmail.com/>
> Using this plan as a starting point, I think renpy counts as a non-
> variant package relying on some python2-variant.
>
>> I just want to point that it is less work to transfer a functional
>> and
>> supported by upstream package than to transfer a package starting to
>> have issues.  Other said, I think it is easier to find motivation to
>> do
>> the transfer for this previous case than to do some “janitor” work
>> later.  For what my opinion is worth. :-)
> Fair enough, I could open up a merge request to have renpy in Guix Past
> "ahead of time", but OTOH I feel like `guix time-machine` offers
> similar benefits.  If we're going to *mirror* python packages, because
> they will soon be broken, I think it would also be a good idea to start
> from python2 instead of leaf packages.

I feel like keeping it all in Guix proper but vaguely "moving things
toward Python 3 wherever possible" is the best approach for now.  An
approach like the one Maxim suggested in the above link sounds good.

Moving Ren'Py to Guix-Past would be fine, I guess, but I have to admit
it feels a little strange.  After all, Ren'Py is neither stale nor
unmaintained.  However, some of its dependencies are (like Python 2),
and their plan for upgrading to Python 3 sounds like it will take years.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Thu, 15 Jul 2021 06:49:01 GMT) Full text and rfc822 format available.

Message #80 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Wed, 14 Jul 2021 23:48:25 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> Am Samstag, den 10.07.2021, 21:53 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
>> 
>> > * gnu/packages/game-development.scm (python2-renpy)[description]:
>> > Mention,
>> > that it's only used for bootstrapping renpy.
>> > ---
>> >  gnu/packages/game-development.scm | 6 ++++--
>> >  1 file changed, 4 insertions(+), 2 deletions(-)
>> > 
>> > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-
>> > development.scm
>> > index 22c44a585c..9b231ad333 100644
>> > --- a/gnu/packages/game-development.scm
>> > +++ b/gnu/packages/game-development.scm
>> > @@ -1250,8 +1250,10 @@ developed mainly for Ren'py.")
>> >         ("xdg-utils" ,xdg-utils)))
>> >      (home-page "https://www.renpy.org/")
>> >      (synopsis "Ren'py python module")
>> > -    (description "This package contains the shared libraries and
>> > Python
>> > -modules of Ren'py.")
>> > +    (description "This package contains the shared libraries and
>> > Python modules
>> > +of Ren'py.  While functional, they are not meaningful on their own
>> > without
>> > +the launcher and common Ren'py code provided by the @code{renpy}
>> > package and
>> > +are only used to bootstrap it.")
>> >      (license license:expat)))
>> >  
>> >  (define-public renpy
>> 
>> LGTM.  If this isn't meant to be installed by users, should it be
>> non-public or perhaps hidden?
> Good point, but I don't think users will accidentally install it like
> they do with gcc.  This description was written to address a point made
> by Ludovic in IRC concerning the package's lack of one.  Having the
> package publicly exported also makes my own life easier when updating
> the recipe.  Last, but not least, these are functional modules and
> could be used to develop code, that depends on Ren'py's internals, but
> none of the "common" renpy stuff (or the common renpy stuff could
> otherwise be extracted from the renpy package and changed to the
> developer's desires).

OK.  I'm fine with that, then.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Thu, 15 Jul 2021 07:22:02 GMT) Full text and rfc822 format available.

Message #83 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Thu, 15 Jul 2021 00:21:19 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
>> 
>> > * gnu/packages/game-development.scm (python-pygame-sdl2): New
>> > variable.
>> > Inherit package definition from previous python2-pygame-sdl2, with
>> > the
>> > following additions:
>> 
>> Actually, it inherits from python-pygame, right?
> "Inherit" as in "use the code that was originally written for python2-
> pygame-sdl2".  Did the inherit field change with this patch?  If so, I
> should reflect it in the commit message.

I see now what you mean.  It's fine.

Personally, I think the word "re-use" would have been clearer, since it
is not possible to confuse it with the "inherit" feature of package
records.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49329; Package guix-patches. (Thu, 15 Jul 2021 07:23:02 GMT) Full text and rfc822 format available.

Message #86 received at 49329 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 49329 <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Thu, 15 Jul 2021 00:22:42 -0700
[Message part 1 (text/plain, inline)]
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> Am Samstag, den 10.07.2021, 21:52 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler <at> 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.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
You have taken responsibility. (Thu, 15 Jul 2021 11:47:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
bug acknowledged by developer. (Thu, 15 Jul 2021 11:47:02 GMT) Full text and rfc822 format available.

Message #91 received at 49329-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 49329-done <at> debbugs.gnu.org
Subject: Re: bug#49329: [PATCH 00/??] Improve Ren'py package
Date: Thu, 15 Jul 2021 13:46:13 +0200
Am Donnerstag, den 15.07.2021, 00:21 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> 
> > Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
> > > Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> > > 
> > > > * gnu/packages/game-development.scm (python-pygame-sdl2): New
> > > > variable.
> > > > Inherit package definition from previous python2-pygame-sdl2,
> > > > with
> > > > the
> > > > following additions:
> > > 
> > > Actually, it inherits from python-pygame, right?
> > "Inherit" as in "use the code that was originally written for
> > python2-
> > pygame-sdl2".  Did the inherit field change with this patch?  If
> > so, I
> > should reflect it in the commit message.
> 
> I see now what you mean.  It's fine.
> 
> Personally, I think the word "re-use" would have been clearer, since
> it
> is not possible to confuse it with the "inherit" feature of package
> records.
I've changed the commit message to say "reuse" and pushed this now.  
Thanks!





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Aug 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 249 days ago.

Previous Next


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