From 3734d3d0c28f288daffc97c341a17055ba6ac046 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Thu, 1 Jul 2021 21:59:49 +0200 Subject: gnu: renpy: Update to 7.4.6. * gnu/packages/game-development.scm (python2-pygame-sdl2): Update to renpy-version 7.4.6. (python2-renpy): Update to version 7.4.6. --- gnu/packages/game-development.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/game-development.scm') diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index f1205e5407..923a174697 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1108,7 +1108,7 @@ to create fully featured games and multimedia programs in the python language.") (define-public python2-pygame-sdl2 (let ((real-version "2.1.0") - (renpy-version "7.4.5")) + (renpy-version "7.4.6")) (package (inherit python2-pygame) (name "python2-pygame-sdl2") @@ -1118,7 +1118,7 @@ to create fully featured games and multimedia programs in the python language.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" renpy-version "/pygame_sdl2-" version ".tar.gz")) - (sha256 (base32 "03jqg4lniazqrm40v2fy4z1a16qzs037r22qavzb6bh7kcmg1ydy")) + (sha256 (base32 "1cay8mb5ww72mkhjp8y467i5alnjinwai2z0xypp78kjapbma9nb")) (modules '((guix build utils))) (snippet '(begin @@ -1161,13 +1161,13 @@ developed mainly for Ren'py.") (define-public python2-renpy (package (name "python2-renpy") - (version "7.4.5") + (version "7.4.6") (source (origin (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "0a7lwijmj9l3sjdmxgwvvlx28byws3z9cq94l417bi6r7f6pcxam")) + (sha256 (base32 "1nnidghwi725n6kizd18fk3fdyh1fx4d48jngg8cnwgnz7i66bd6")) (modules '((guix build utils))) (patches (search-patches -- cgit v1.2.3 From 7f580c27daa5076f1961acabe4e6b4c7b17763c3 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 2 Jul 2021 13:29:37 +0200 Subject: gnu: tsukundere: Update to 0.3.2. * gnu/packages/game-development.scm (tsukundere): Update to 0.3.2. --- gnu/packages/game-development.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/game-development.scm') diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 923a174697..9069b88d0c 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -494,7 +494,7 @@ clone.") (define-public tsukundere (package (name "tsukundere") - (version "0.3.1") + (version "0.3.2") (source (origin (method git-fetch) (uri (git-reference @@ -503,7 +503,7 @@ clone.") (file-name (git-file-name name version)) (sha256 (base32 - "13p9inz7jj3hm2lmx4p0lhva4ng1m148pjzhq12ybc4kk139i75b")))) + "05y3nj8vpn40hfr2y29p8pa9hhpzibhbvfzpm0dlphjh9crq3ii4")))) (build-system gnu-build-system) (arguments `(#:modules ((ice-9 match) -- cgit v1.2.3 From d4bef961b5b7052283aa7bf2a4a15b6ef1388194 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 2 Jul 2021 14:17:11 +0200 Subject: gnu: python2-renpy: Drop unused Ren'py sources. 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]: Drop installed "common" folder. (renpy)[#:phases]: Adjust comment accordingly. --- gnu/packages/game-development.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'gnu/packages/game-development.scm') 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")) -- cgit v1.2.3 From a613e6268de9864fe8ea9e72415b8fe4eea9a4d9 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 2 Jul 2021 14:21:14 +0200 Subject: gnu: python2-renpy: Update description. * 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(-) (limited to 'gnu/packages/game-development.scm') 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 -- cgit v1.2.3 From 3d7dea0906a59ff84308907b1488da52956a614c Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 2 Jul 2021 14:46:28 +0200 Subject: gnu: python2-renpy: Correct inputs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/game-development.scm (python2-renpy)[#:phases]: Search for ‘xdg-open’ in inputs. : 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(-) (limited to 'gnu/packages/game-development.scm') 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 -- cgit v1.2.3 From 769f7d2ccf6be9399a422e36afba146a819a5d1d Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 2 Jul 2021 15:43:32 +0200 Subject: gnu: renpy: Correct inputs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/game-development.scm (renpy)[#:modules]: Add SRFI-1. [#:imported-modules]: Likewise. [#:phases]: Search for ‘python2’ and ‘xdg-open’ in inputs. : Search for ‘xorg-server’ in native-inputs. : Search for ‘python2’ in inputs. : 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(-) (limited to 'gnu/packages/game-development.scm') 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/") -- cgit v1.2.3 From 313d5e62864fdcef45a0d6b334c6a210683bad88 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Sat, 3 Jul 2021 11:24:19 +0200 Subject: gnu: Add python-pygame-sdl2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/game-development.scm (python-pygame-sdl2): New variable. Reuse 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(-) (limited to 'gnu/packages/game-development.scm') 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") -- cgit v1.2.3