From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8K+jDMsWl2XWRAAAkFu2QA (envelope-from ) for ; Thu, 04 Jan 2024 21:36:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CKgnBcsWl2UWUwAA62LTzQ (envelope-from ) for ; Thu, 04 Jan 2024 21:36:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704400586; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=3XyP16+T9D8Iv3movf+ElglRPmOvF2IeL+o1xDBg3pU=; b=M1cEQFuJHwcCICHbZbWlPXJMJ8aQR9+94TCGQohl7tF5tYbSABbybu7L3h1DFAFHyX9r98 6Y1hYUSwnZW42ak55R9ZbMd0HFWVjVyiSMPeJLtF/pN5xdkcpS0fCnjL/NcrC6RwahU8Qc 0igZQjSVHz262rqilJtVqDHExUcjWjWFQFe3K8/HICTF9PIrM99SVnGbGv+1SQ/ArC8qDJ havpOmDIDupufSz/8mYklR9H4j47IjI39NnBTlRD+qyFdY9QyUmOo/cDoYkqIN8Ag/5FHs XmTOsGoLIluClT4k2sokQ5t3GSWopDZtdIANvAPH4OwWWwhwb4lVw0k3Kve0ZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704400586; a=rsa-sha256; cv=none; b=WoTic667v5PUSfXIHlCJ/yCf8zxfWYZvDn2qY/qZPkHS8s0j4lKHruSrKAW2mJNHn6C1DL 9+K7y7F4ZGdJXVVJEtfQKKCfjGwCMvBN7WbwMPEzuUX0MWKek5WC9cCbB6xSi1AX/LjqX3 i6iRsVokx//bvugOxitYt4et6rMsRjB83ryTL8+4Xk/RkiTcaw91BjnMfL0KUer9ozDSkH +l5moVzm5lFiEPu6PPN+kEZWQW2o4DSmR6hscvN34GxScxCb/K2tOIWxk4MBNDwV36Xzjp XjsJ4NFt8IT8ajh4AEQ4foB+3ZAqW3Xctx+n83x36qhhBG1SBwP4JswX5eZL5w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D427964921 for ; Thu, 4 Jan 2024 21:36:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLURe-0006xs-GI; Thu, 04 Jan 2024 15:36:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLURb-0006ci-4q for bug-guix@gnu.org; Thu, 04 Jan 2024 15:35:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLURa-0006AG-PG for bug-guix@gnu.org; Thu, 04 Jan 2024 15:35:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLURe-0008BW-FU for bug-guix@gnu.org; Thu, 04 Jan 2024 15:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#66173: [PATCH 1/2] gnu: fifengine: Fix runtime error when using Python 3.9 or newer. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 04 Jan 2024 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66173 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 66173@debbugs.gnu.org Received: via spool by 66173-submit@debbugs.gnu.org id=B66173.170440052031378 (code B ref 66173); Thu, 04 Jan 2024 20:36:02 +0000 Received: (at 66173) by debbugs.gnu.org; 4 Jan 2024 20:35:20 +0000 Received: from localhost ([127.0.0.1]:55800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLUQx-0008A2-S8 for submit@debbugs.gnu.org; Thu, 04 Jan 2024 15:35:20 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:36968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLUQr-00089I-Mw for 66173@debbugs.gnu.org; Thu, 04 Jan 2024 15:35:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 24289659ED for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jQWjB8h_NbI3 for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:33 +0000 (UTC) Received: from jupiter.smallsystems.net (23-233-96-210.cpe.pppoe.ca [23.233.96.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id BBC68659FA for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:33 +0000 (UTC) From: Simon South Date: Thu, 4 Jan 2024 15:33:55 -0500 Message-ID: <6a115cc55b808c3776c80f809542e53937dbc8a6.1704399085.git.simon@simonsouth.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -4.97 X-Spam-Score: -4.97 X-Migadu-Queue-Id: D427964921 X-TUID: 0PR6wDTa2Pe/ * gnu/packages/patches/fifengine-python-3.9-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/games.scm (fifengine)[source]: Apply it. Change-Id: I61001d6b87db00c71f1e2e6ca3bac8581e941451 --- gnu/local.mk | 1 + gnu/packages/games.scm | 3 +- .../patches/fifengine-python-3.9-compat.patch | 81 +++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fifengine-python-3.9-compat.patch diff --git a/gnu/local.mk b/gnu/local.mk index f804f4ef5b..f66db809a9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1166,6 +1166,7 @@ dist_patch_DATA = \ %D%/packages/patches/fenics-dolfin-boost.patch \ %D%/packages/patches/fenics-dolfin-config-slepc.patch \ %D%/packages/patches/fifengine-boost-compat.patch \ + %D%/packages/patches/fifengine-python-3.9-compat.patch \ %D%/packages/patches/fifengine-swig-compat.patch \ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index c7813790a1..333dbfcec5 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -4060,7 +4060,8 @@ (define-public fifengine "fifengine/tar.gz/" version)) (file-name (string-append name "-" version ".tar.gz")) (patches (search-patches "fifengine-swig-compat.patch" - "fifengine-boost-compat.patch")) + "fifengine-boost-compat.patch" + "fifengine-python-3.9-compat.patch")) (sha256 (base32 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8")))) diff --git a/gnu/packages/patches/fifengine-python-3.9-compat.patch b/gnu/packages/patches/fifengine-python-3.9-compat.patch new file mode 100644 index 0000000000..2def4681cd --- /dev/null +++ b/gnu/packages/patches/fifengine-python-3.9-compat.patch @@ -0,0 +1,81 @@ +Fix runtime error when using Python 3.9 or newer. + +Taken from upstream: +https://github.com/fifengine/fifengine/commit/cf295fd98a8fba080f6305c27be56d10ab7ce94d + +diff --git a/engine/python/fife/extensions/serializers/simplexml.py b/engine/python/fife/extensions/serializers/simplexml.py +index c4e10f4f8..d05567936 100644 +--- a/engine/python/fife/extensions/serializers/simplexml.py ++++ b/engine/python/fife/extensions/serializers/simplexml.py +@@ -200,7 +200,7 @@ def get(self, module, name, defaultValue=None): + #get the module tree: for example find tree under module FIFE + moduleTree = self._getModuleTree(module) + element = None +- for e in moduleTree.getchildren(): ++ for e in moduleTree: + if e.tag == "Setting" and e.get("name", "") == name: + element = e + break +@@ -275,7 +275,7 @@ def set(self, module, name, value, extra_attrs={}): + e_type = "str" + value = str(value) + +- for e in moduleTree.getchildren(): ++ for e in moduleTree: + if e.tag != "Setting": continue + if e.get("name", "") == name: + e.text = value +@@ -305,7 +305,7 @@ def remove(self, module, name): + + moduleTree = self._getModuleTree(module) + +- for e in moduleTree.getchildren(): ++ for e in moduleTree: + if e.tag != "Setting": continue + if e.get("name", "") == name: + moduleTree.remove(e) +@@ -321,7 +321,7 @@ def getModuleNameList(self): + self._initialized = True + + moduleNames = [] +- for c in self._root_element.getchildren(): ++ for c in self._root_element: + if c.tag == "Module": + name = c.get("name","") + if not isinstance(name, basestring): +@@ -344,7 +344,7 @@ def getAllSettings(self, module): + + # now from the tree read every value, and put the necessary values + # to the list +- for e in moduleTree.getchildren(): ++ for e in moduleTree: + if e.tag == "Setting": + name = e.get("name", "") + +@@ -383,7 +383,7 @@ def _validateTree(self): + + Raises an InvalidFormat exception if there is a format error. + """ +- for c in self._root_element.getchildren(): ++ for c in self._root_element: + if c.tag != "Module": + raise InvalidFormat("Invalid tag in " + self._file + \ + ". Expected Module, got: " + c.tag) +@@ -391,7 +391,7 @@ def _validateTree(self): + raise InvalidFormat("Invalid tag in " + self._file + \ + ". Module name is empty.") + else: +- for e in c.getchildren(): ++ for e in c: + if e.tag != "Setting": + raise InvalidFormat("Invalid tag in " + self._file + \ + " in module: " + c.tag + \ +@@ -414,7 +414,7 @@ def _getModuleTree(self, module): + raise AttributeError("Settings:_getModuleTree: Invalid type for " + "module argument.") + +- for c in self._root_element.getchildren(): ++ for c in self._root_element: + if c.tag == "Module" and c.get("name", "") == module: + return c + -- 2.41.0