mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
python3-pycollada: update to 0.8.
This commit is contained in:
parent
06f2c06ee2
commit
639e6b7a5c
2 changed files with 79 additions and 7 deletions
72
srcpkgs/python3-pycollada/patches/numpy-2.0.patch
Normal file
72
srcpkgs/python3-pycollada/patches/numpy-2.0.patch
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
From 39cabd78c4bdbdab763a510be3c2ff378ee9d75b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||||
|
Date: Fri, 24 May 2024 16:25:40 +0200
|
||||||
|
Subject: [PATCH] Fix compatibility with NumPy 2.0 (#147)
|
||||||
|
|
||||||
|
---
|
||||||
|
collada/source.py | 4 ++--
|
||||||
|
collada/tests/test_source.py | 8 ++++----
|
||||||
|
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/collada/source.py b/collada/source.py
|
||||||
|
index e7c7a06..6a0e715 100644
|
||||||
|
--- a/collada/source.py
|
||||||
|
+++ b/collada/source.py
|
||||||
|
@@ -318,7 +318,7 @@ def load(collada, localscope, node):
|
||||||
|
values = [v for v in arraynode.text.split()]
|
||||||
|
except ValueError:
|
||||||
|
raise DaeMalformedError('Corrupted IDREF array')
|
||||||
|
- data = numpy.array(values, dtype=numpy.unicode_)
|
||||||
|
+ data = numpy.array(values, dtype=numpy.str_)
|
||||||
|
paramnodes = node.findall('%s/%s/%s' % (collada.tag('technique_common'), collada.tag('accessor'), collada.tag('param')))
|
||||||
|
if not paramnodes:
|
||||||
|
raise DaeIncompleteError('No accessor info in source node')
|
||||||
|
@@ -425,7 +425,7 @@ def load(collada, localscope, node):
|
||||||
|
values = [v for v in arraynode.text.split()]
|
||||||
|
except ValueError:
|
||||||
|
raise DaeMalformedError('Corrupted Name array')
|
||||||
|
- data = numpy.array(values, dtype=numpy.unicode_)
|
||||||
|
+ data = numpy.array(values, dtype=numpy.str_)
|
||||||
|
paramnodes = node.findall('%s/%s/%s' % (tag('technique_common'), tag('accessor'), tag
|
||||||
|
('param')))
|
||||||
|
if not paramnodes:
|
||||||
|
diff --git a/collada/tests/test_source.py b/collada/tests/test_source.py
|
||||||
|
index 9ec0529..81dda61 100644
|
||||||
|
--- a/collada/tests/test_source.py
|
||||||
|
+++ b/collada/tests/test_source.py
|
||||||
|
@@ -31,7 +31,7 @@ def test_float_source_saving(self):
|
||||||
|
|
||||||
|
def test_idref_source_saving(self):
|
||||||
|
idrefsource = collada.source.IDRefSource("myidrefsource",
|
||||||
|
- numpy.array(['Ref1', 'Ref2'], dtype=numpy.string_),
|
||||||
|
+ numpy.array(['Ref1', 'Ref2'], dtype=numpy.bytes_),
|
||||||
|
('MORPH_TARGET',))
|
||||||
|
self.assertEqual(idrefsource.id, "myidrefsource")
|
||||||
|
self.assertEqual(len(idrefsource), 2)
|
||||||
|
@@ -39,7 +39,7 @@ def test_idref_source_saving(self):
|
||||||
|
self.assertIsNotNone(str(idrefsource))
|
||||||
|
idrefsource.id = "youridrefsource"
|
||||||
|
idrefsource.components = ('JOINT_TARGET', 'WHATEVER_TARGET')
|
||||||
|
- idrefsource.data = numpy.array(['Ref5', 'Ref6', 'Ref7', 'Ref8', 'Ref9', 'Ref10'], dtype=numpy.string_)
|
||||||
|
+ idrefsource.data = numpy.array(['Ref5', 'Ref6', 'Ref7', 'Ref8', 'Ref9', 'Ref10'], dtype=numpy.bytes_)
|
||||||
|
idrefsource.save()
|
||||||
|
loaded_idrefsource = collada.source.Source.load(self.dummy, {}, fromstring(tostring(idrefsource.xmlnode)))
|
||||||
|
self.assertTrue(isinstance(loaded_idrefsource, collada.source.IDRefSource))
|
||||||
|
@@ -49,7 +49,7 @@ def test_idref_source_saving(self):
|
||||||
|
|
||||||
|
def test_name_source_saving(self):
|
||||||
|
namesource = collada.source.NameSource("mynamesource",
|
||||||
|
- numpy.array(['Name1', 'Name2'], dtype=numpy.string_),
|
||||||
|
+ numpy.array(['Name1', 'Name2'], dtype=numpy.bytes_),
|
||||||
|
('JOINT',))
|
||||||
|
self.assertEqual(namesource.id, "mynamesource")
|
||||||
|
self.assertEqual(len(namesource), 2)
|
||||||
|
@@ -57,7 +57,7 @@ def test_name_source_saving(self):
|
||||||
|
self.assertIsNotNone(str(namesource))
|
||||||
|
namesource.id = "yournamesource"
|
||||||
|
namesource.components = ('WEIGHT', 'WHATEVER')
|
||||||
|
- namesource.data = numpy.array(['Name1', 'Name2', 'Name3', 'Name4', 'Name5', 'Name6'], dtype=numpy.string_)
|
||||||
|
+ namesource.data = numpy.array(['Name1', 'Name2', 'Name3', 'Name4', 'Name5', 'Name6'], dtype=numpy.bytes_)
|
||||||
|
namesource.save()
|
||||||
|
loaded_namesource = collada.source.Source.load(self.dummy, {}, fromstring(tostring(namesource.xmlnode)))
|
||||||
|
self.assertTrue(isinstance(loaded_namesource, collada.source.NameSource))
|
|
@ -1,17 +1,17 @@
|
||||||
# Template file for 'python3-pycollada'
|
# Template file for 'python3-pycollada'
|
||||||
pkgname=python3-pycollada
|
pkgname=python3-pycollada
|
||||||
version=0.7.2
|
version=0.8
|
||||||
revision=3
|
revision=1
|
||||||
build_style=python3-module
|
build_style=python3-pep517
|
||||||
hostmakedepends="python3-setuptools"
|
hostmakedepends="python3-setuptools python3-wheel"
|
||||||
depends="python3-dateutil python3-lxml python3-numpy"
|
depends="python3-dateutil python3-numpy"
|
||||||
checkdepends="python3-Cython ${depends}"
|
checkdepends="${depends} python3-lxml python3-pytest-xdist"
|
||||||
short_desc="Python3 module for creating, editing, and loding COLLADA files"
|
short_desc="Python3 module for creating, editing, and loding COLLADA files"
|
||||||
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
|
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
|
||||||
license="BSD-3-Clause"
|
license="BSD-3-Clause"
|
||||||
homepage="https://pycollada.readthedocs.io/en/latest/"
|
homepage="https://pycollada.readthedocs.io/en/latest/"
|
||||||
distfiles="https://github.com/pycollada/pycollada/archive/v${version}.tar.gz"
|
distfiles="https://github.com/pycollada/pycollada/archive/v${version}.tar.gz"
|
||||||
checksum=e3c29857a65b3dd9c0375c1074195195fc3dada95d6b5c78d246b005f2e85c93
|
checksum=0ed3d422c2e287c187a6f744ad9db2d3bfef69f72d3666d037f1e01a245f5cbc
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense COPYING
|
vlicense COPYING
|
||||||
|
|
Loading…
Add table
Reference in a new issue