fifengine: patch from upstream to fix deprecation errors.
Also add missing maintainer line in template
This commit is contained in:
parent
88526be357
commit
04d887f784
|
@ -0,0 +1,85 @@
|
|||
From cf295fd98a8fba080f6305c27be56d10ab7ce94d Mon Sep 17 00:00:00 2001
|
||||
From: Lukas1818 <git@lukas1818.de>
|
||||
Date: Mon, 8 Feb 2021 20:34:19 +0100
|
||||
Subject: [PATCH] remove deprecated getchildren()
|
||||
|
||||
---
|
||||
.../fife/extensions/serializers/simplexml.py | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
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
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
# Template file for 'fifengine'
|
||||
pkgname=fifengine
|
||||
version=0.4.2
|
||||
revision=7
|
||||
revision=8
|
||||
build_style=cmake
|
||||
pycompile_module="fife"
|
||||
hostmakedepends="swig python3"
|
||||
makedepends="SDL2-devel SDL2_image-devel SDL2_ttf-devel boost-devel
|
||||
libopenal-devel tinyxml-devel fifechan-devel python3-devel libXcursor-devel
|
||||
glew-devel"
|
||||
depends="python3-future"
|
||||
short_desc="Multi-platform isometric game engine"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="LGPL-2.1-or-later"
|
||||
homepage="https://github.com/fifengine/fifengine"
|
||||
distfiles="https://github.com/fifengine/fifengine/archive/${version}.tar.gz"
|
||||
|
|
Loading…
Reference in New Issue