diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-05-25 00:07:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-05-25 00:07:14 +0100 |
commit | f8999218b5a6eafa151e7367030cbfdb69e045ed (patch) | |
tree | 0d0e9293bcb75153cd18542369fa789ede9338a0 /dev-python/pycollada | |
parent | aa4954f71a3ba2293395a8cce2321a70c39c7554 (diff) |
gentoo auto-resync : 25:05:2024 - 00:07:14
Diffstat (limited to 'dev-python/pycollada')
-rw-r--r-- | dev-python/pycollada/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pycollada/files/pycollada-0.8-numpy-2.patch | 76 | ||||
-rw-r--r-- | dev-python/pycollada/pycollada-0.8-r1.ebuild (renamed from dev-python/pycollada/pycollada-0.8.ebuild) | 7 |
3 files changed, 84 insertions, 2 deletions
diff --git a/dev-python/pycollada/Manifest b/dev-python/pycollada/Manifest index d1913c8ddbb1..df29c2139137 100644 --- a/dev-python/pycollada/Manifest +++ b/dev-python/pycollada/Manifest @@ -1,3 +1,4 @@ +AUX pycollada-0.8-numpy-2.patch 4352 BLAKE2B ea530b93aed15cf2dfee3f0e02ff523daea5c4ad8852f499b6459d3c2446f206fe9b2fa86d6e39473fa01f39de2eba0592174452e9339889fdfc693b6c9fd1a1 SHA512 85bcbd8e6ad740c5df39ae757ff883758992f3c5aba1aaf2032d58bf9206413925829d108aafcfa99a9b90539a9abcc3437092577176b4dbee9a960d8a99e811 DIST pycollada-0.8.gh.tar.gz 3586706 BLAKE2B 533a2a309b4c7ee60671edfd241b80e7128330b2cd85d2707fc4f83b0aceb2d792d8efec77f9a6a8600eec0704878a4342449fde68f77e42617eff30965973a5 SHA512 7171469b8434a7c24ec2ebadefa9ad5268382659cb5b2b3712cf0ba73c7948e7fa4061ecfa02001862c76e1139293ab68cf425472222348e28efa28bc75f844f -EBUILD pycollada-0.8.ebuild 1120 BLAKE2B 1fbf7ca2fd07dd4750f3d1f548b026475726f5917790839e685a99911329614ffc4ee6ce127296ba8938f7bc8e821f6787f3ea60b7d4ebed99bfe73415887ddb SHA512 72a6aa845a3d3bd8060758b00e43677c856cd6868ee0fdbc04f969489567340a24abd892651c9a6888a08774d9f6ec9ae7d7ad79f746a4f2777a6f9d7c6a6082 +EBUILD pycollada-0.8-r1.ebuild 1218 BLAKE2B a3103f1f562bdf6dd73da5d84c1b99a16ef4211f7a7a3b960adc8efb5a8cbf11a28361941cebbcf48d168bd96ec999cb48325d1963f69f241eaf16ddf08eea76 SHA512 fea07a5c66289055ac9eb6c026b3feed2e8a9908191345152bf49affac22f1381bec6b85640ad8ccf839378a656cdcee56dab88ae7a6e8bf24d358cdfe3b28a8 MISC metadata.xml 905 BLAKE2B 9e1283685c76cd27ff971ab68ef51f56cf296aa44fe3dbb5bf74a3e6b4ea69abb927603acc16747bd1bf8db906b4437cf792330df5e7803a211b1699a01034d3 SHA512 686ffa6bb798bd4387106cdb461f0abdc2a685c53c4552c95c86febd6789e4b323ae1ac9717109fea96287ac100a93b33e3ce37eea37e6de3e4f4e704e40e9e8 diff --git a/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch b/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch new file mode 100644 index 000000000000..4ffb80a8b61e --- /dev/null +++ b/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch @@ -0,0 +1,76 @@ +From 2049c3625bef06ba5fad8169c042cbdb3641b4d1 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 11:27:57 +0200 +Subject: [PATCH] Fix tests with NumPy 2.0 + +Replace the deprecated `string_` and `unicode_` aliases with the modern +`bytes_` and `str_` replacements to fix compatibility with NumPy 2.0. +This change does not change anything for NumPy 1.x where both types +are aliases to each other. +--- + 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)) diff --git a/dev-python/pycollada/pycollada-0.8.ebuild b/dev-python/pycollada/pycollada-0.8-r1.ebuild index 6b416a491a78..6468d680d9fc 100644 --- a/dev-python/pycollada/pycollada-0.8.ebuild +++ b/dev-python/pycollada/pycollada-0.8-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 @@ -32,6 +32,11 @@ RDEPEND=" DOCS=( AUTHORS.md COPYING README.markdown ) +PATCHES=( + # https://github.com/pycollada/pycollada/pull/147 + "${FILESDIR}/${P}-numpy-2.patch" +) + distutils_enable_sphinx docs distutils_enable_tests unittest |