diff options
author | Simon South <simon@simonsouth.net> | 2024-01-04 15:33:56 -0500 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2024-01-14 10:02:07 +0100 |
commit | 3351c5e59d0a975bb80b60a8ddbe374e130617ce (patch) | |
tree | 32bce01fa72f6f663801fd40d4316b152b156dd3 /gnu/packages/patches/unknown-horizons-python-3.9.patch | |
parent | e7823dbe8c32482ef02c53e688433fdc4a453aea (diff) | |
download | guix-3351c5e59d0a975bb80b60a8ddbe374e130617ce.tar.gz guix-3351c5e59d0a975bb80b60a8ddbe374e130617ce.zip |
gnu: unknown-horizons: Fix build and runtime errors.
Apply two upstream commits that allow building with Python 3.9 or newer and
running with Python 3.10.
* gnu/packages/patches/unknown-horizons-python-3.9.patch: New file.
* gnu/packages/patches/unknown-horizons-python-3.10.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/games.scm (unknown-horizons)[source]: Apply them.
Change-Id: Icbc8b698b913be01465b09ab26afb29e5fd62a87
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Fixes: Unknown Horizons fails to start <https://bugs.gnu.org/54815>
Diffstat (limited to 'gnu/packages/patches/unknown-horizons-python-3.9.patch')
-rw-r--r-- | gnu/packages/patches/unknown-horizons-python-3.9.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/patches/unknown-horizons-python-3.9.patch b/gnu/packages/patches/unknown-horizons-python-3.9.patch new file mode 100644 index 0000000000..8b93a71b6c --- /dev/null +++ b/gnu/packages/patches/unknown-horizons-python-3.9.patch @@ -0,0 +1,41 @@ +From 7f6f613826aef9810999c1599c8354e8a78fbdb4 Mon Sep 17 00:00:00 2001 +From: Lukas1818 <44570204+Lukas1818@users.noreply.github.com> +Date: Fri, 19 Feb 2021 21:08:44 +0100 +Subject: [PATCH] fixs for Phyton 3.9 (#2955) + +* change deprecated isAlive() to is_alive() + +* remove unsupported keyword "encoding" + +Co-authored-by: Lukas1818 <git@lukas1818.de> +--- + horizons/util/loaders/jsondecoder.py | 2 +- + horizons/util/preloader.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/horizons/util/loaders/jsondecoder.py b/horizons/util/loaders/jsondecoder.py +index ea2ddfb3308..138a948f42a 100644 +--- a/horizons/util/loaders/jsondecoder.py ++++ b/horizons/util/loaders/jsondecoder.py +@@ -37,4 +37,4 @@ def _decode_dict(dct): + return newdict + + with open(path, "r") as f: +- return json.load(f, encoding="ascii", object_hook=_decode_dict) ++ return json.load(f, object_hook=_decode_dict) +diff --git a/horizons/util/preloader.py b/horizons/util/preloader.py +index 5689cc68152..2e072fcc642 100644 +--- a/horizons/util/preloader.py ++++ b/horizons/util/preloader.py +@@ -79,9 +79,9 @@ def wait_for_finish(self): + """ + self.lock.acquire() + # wait until it finished its current action +- if self.isAlive(): ++ if self.is_alive(): + self.join() +- assert not self.isAlive() ++ assert not self.is_alive() + else: + try: + self.lock.release() |