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.10.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.10.patch')
-rw-r--r-- | gnu/packages/patches/unknown-horizons-python-3.10.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/unknown-horizons-python-3.10.patch b/gnu/packages/patches/unknown-horizons-python-3.10.patch new file mode 100644 index 0000000000..599de1fec5 --- /dev/null +++ b/gnu/packages/patches/unknown-horizons-python-3.10.patch @@ -0,0 +1,32 @@ +From 4ff605d6c55fcf3e9b4777ffbcb0c24ef17ba4ca Mon Sep 17 00:00:00 2001 +From: Arti <artism90@googlemail.com> +Date: Mon, 28 Feb 2022 21:19:50 +0100 +Subject: [PATCH] Rename instances of `collections.Iterable` into + `collections.abc.Iterable` (#2956) + +--- + horizons/ai/aiplayer/combat/unitmanager.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/horizons/ai/aiplayer/combat/unitmanager.py b/horizons/ai/aiplayer/combat/unitmanager.py +index 8449d5563c5..57db0d47061 100644 +--- a/horizons/ai/aiplayer/combat/unitmanager.py ++++ b/horizons/ai/aiplayer/combat/unitmanager.py +@@ -151,7 +151,7 @@ def _ship_state_rule(self, state_dict, ship_states): + """ + Rule stating that ship has to be in any of given states. + """ +- if not isinstance(ship_states, collections.Iterable): ++ if not isinstance(ship_states, collections.abc.Iterable): + ship_states = (ship_states,) + return lambda ship: (state_dict[ship] in ship_states) + +@@ -178,7 +178,7 @@ def filter_ships(self, ships, rules): + @param rules: conditions each ship has to meet (AND) + @type rules: iterable of lambda(ship) or single lambda(ship) + """ +- if not isinstance(rules, collections.Iterable): ++ if not isinstance(rules, collections.abc.Iterable): + rules = (rules,) + return [ship for ship in ships if all((rule(ship) for rule in rules))] + |