* [bug#49329] [PATCH v2 2/5] gnu: python2-renpy: Update description.
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 ` Leo Prikler
2021-07-11 4:53 ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-03 9:28 ` [bug#49329] [PATCH v2 3/5] gnu: python2-renpy: Correct inputs Leo Prikler
` (3 subsequent siblings)
4 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-03 9:28 UTC (permalink / raw)
To: 49329
* 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
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-03 9:28 ` [bug#49329] [PATCH v2 2/5] gnu: python2-renpy: Update description Leo Prikler
@ 2021-07-11 4:53 ` Chris Marusich
2021-07-11 7:09 ` Leo Prikler
0 siblings, 1 reply; 29+ messages in thread
From: Chris Marusich @ 2021-07-11 4:53 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
Leo Prikler <leo.prikler@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
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
0 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-11 7:09 UTC (permalink / raw)
To: Chris Marusich; +Cc: 49329
Am Samstag, den 10.07.2021, 21:53 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler@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
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-11 7:09 ` Leo Prikler
@ 2021-07-15 6:48 ` Chris Marusich
0 siblings, 0 replies; 29+ messages in thread
From: Chris Marusich @ 2021-07-15 6:48 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]
Leo Prikler <leo.prikler@student.tugraz.at> writes:
> Am Samstag, den 10.07.2021, 21:53 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH v2 3/5] gnu: python2-renpy: Correct inputs.
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-03 9:28 ` 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
` (2 subsequent siblings)
4 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-03 9:28 UTC (permalink / raw)
To: 49329
* 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
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH v2 4/5] gnu: renpy: Correct inputs.
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-03 9:28 ` [bug#49329] [PATCH v2 3/5] gnu: python2-renpy: Correct inputs Leo Prikler
@ 2021-07-03 9:28 ` Leo Prikler
2021-07-11 4:37 ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-03 9:28 ` [bug#49329] [PATCH v2 5/5] gnu: Add python-pygame-sdl2 Leo Prikler
2021-07-11 4:52 ` [bug#49329] " Chris Marusich
4 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-03 9:28 UTC (permalink / raw)
To: 49329
* 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
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-03 9:28 ` [bug#49329] [PATCH v2 4/5] gnu: renpy: Correct inputs Leo Prikler
@ 2021-07-11 4:37 ` Chris Marusich
2021-07-11 6:58 ` Leo Prikler
0 siblings, 1 reply; 29+ messages in thread
From: Chris Marusich @ 2021-07-11 4:37 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]
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?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-11 4:37 ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
@ 2021-07-11 6:58 ` Leo Prikler
0 siblings, 0 replies; 29+ messages in thread
From: Leo Prikler @ 2021-07-11 6:58 UTC (permalink / raw)
To: Chris Marusich; +Cc: 49329
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
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH v2 5/5] gnu: Add python-pygame-sdl2.
2021-07-03 9:28 ` [bug#49329] [PATCH v2 1/5] gnu: python2-renpy: Drop unused Ren'py sources Leo Prikler
` (2 preceding siblings ...)
2021-07-03 9:28 ` [bug#49329] [PATCH v2 4/5] gnu: renpy: Correct inputs Leo Prikler
@ 2021-07-03 9:28 ` Leo Prikler
2021-07-11 4:44 ` [bug#49329] [PATCH 00/??] Improve Ren'py package Chris Marusich
2021-07-11 4:52 ` [bug#49329] " Chris Marusich
4 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-03 9:28 UTC (permalink / raw)
To: 49329
* 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
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-03 9:28 ` [bug#49329] [PATCH v2 5/5] gnu: Add python-pygame-sdl2 Leo Prikler
@ 2021-07-11 4:44 ` Chris Marusich
2021-07-11 7:00 ` Leo Prikler
0 siblings, 1 reply; 29+ messages in thread
From: Chris Marusich @ 2021-07-11 4:44 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Leo Prikler <leo.prikler@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
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
0 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-11 7:00 UTC (permalink / raw)
To: Chris Marusich; +Cc: 49329
Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler@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.
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-11 7:00 ` Leo Prikler
@ 2021-07-15 7:21 ` Chris Marusich
2021-07-15 11:46 ` bug#49329: " Leo Prikler
0 siblings, 1 reply; 29+ messages in thread
From: Chris Marusich @ 2021-07-15 7:21 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
Leo Prikler <leo.prikler@student.tugraz.at> writes:
> Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
>> Leo Prikler <leo.prikler@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* bug#49329: [PATCH 00/??] Improve Ren'py package
2021-07-15 7:21 ` Chris Marusich
@ 2021-07-15 11:46 ` Leo Prikler
0 siblings, 0 replies; 29+ messages in thread
From: Leo Prikler @ 2021-07-15 11:46 UTC (permalink / raw)
To: Chris Marusich; +Cc: 49329-done
Am Donnerstag, den 15.07.2021, 00:21 -0700 schrieb Chris Marusich:
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>
> > Am Samstag, den 10.07.2021, 21:44 -0700 schrieb Chris Marusich:
> > > Leo Prikler <leo.prikler@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!
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-03 9:28 ` [bug#49329] [PATCH v2 1/5] gnu: python2-renpy: Drop unused Ren'py sources Leo Prikler
` (3 preceding siblings ...)
2021-07-03 9:28 ` [bug#49329] [PATCH v2 5/5] gnu: Add python-pygame-sdl2 Leo Prikler
@ 2021-07-11 4:52 ` Chris Marusich
2021-07-11 7:03 ` Leo Prikler
4 siblings, 1 reply; 29+ messages in thread
From: Chris Marusich @ 2021-07-11 4:52 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
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.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-11 4:52 ` [bug#49329] " Chris Marusich
@ 2021-07-11 7:03 ` Leo Prikler
2021-07-15 7:22 ` Chris Marusich
0 siblings, 1 reply; 29+ messages in thread
From: Leo Prikler @ 2021-07-11 7:03 UTC (permalink / raw)
To: Chris Marusich; +Cc: 49329
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
^ permalink raw reply [flat|nested] 29+ messages in thread
* [bug#49329] [PATCH 00/??] Improve Ren'py package
2021-07-11 7:03 ` Leo Prikler
@ 2021-07-15 7:22 ` Chris Marusich
0 siblings, 0 replies; 29+ messages in thread
From: Chris Marusich @ 2021-07-15 7:22 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49329
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
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.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread