diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-06-17 10:27:59 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-06-17 18:49:05 +0200 |
commit | 6c04a8961fe15a6c856a2fb08ac39dab90d08be0 (patch) | |
tree | e65637d79f121590997f0fc4df67db19110837a4 /gnu/packages/aux-files | |
parent | 62a7455107d82bc45975425c5973fc9dc3f6efaf (diff) | |
download | guix-6c04a8961fe15a6c856a2fb08ac39dab90d08be0.tar.gz |
gnu: renpy: Update to 7.99.99-0-3e854bc.
* gnu/packages/aux-files/renpy/renpy.in (__renpy_files, path_to_gamedir): New procedures. * gnu/packages/game-development.scm (python-renpy): Update to 7.99.99-0-3e854bc. (renpy): Likewise. [inputs]: Add python-pefile, python-requests and python-six.
Diffstat (limited to 'gnu/packages/aux-files')
-rw-r--r-- | gnu/packages/aux-files/renpy/renpy.in | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gnu/packages/aux-files/renpy/renpy.in b/gnu/packages/aux-files/renpy/renpy.in index 914a735fa4..9115d9aee3 100644 --- a/gnu/packages/aux-files/renpy/renpy.in +++ b/gnu/packages/aux-files/renpy/renpy.in @@ -1,12 +1,29 @@ #! @PYTHON@ # -*- mode: python -*- -from __future__ import print_function - +import glob import os import sys import warnings +def __renpy_files(directory): + for pattern in ['*.rpa', '*.rpyc', '*.rpy']: + for file in glob.iglob(pattern, root_dir=directory): + yield file + +def path_to_gamedir(basedir, name): + candidates = [name, 'game', 'data', 'launcher/game'] + + if __renpy_files(basedir): + return basedir + + for candidate in candidates: + gamedir = os.path.join(basedir, candidate) + if __renpy_files(gamedir): + return gamedir + + return basedir + def path_to_common(renpy_base): return renpy_base + "/common" |