public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pycollada/files/, dev-python/pycollada/
@ 2024-05-24 11:09 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-05-24 11:09 UTC (permalink / raw
  To: gentoo-commits

commit:     62450f869d71631ddf1f11dbce2b687f90f081ef
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 09:32:43 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 24 11:09:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62450f86

dev-python/pycollada: Fix compatibility with >=dev-python/numpy-2

Closes: https://bugs.gentoo.org/932518
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pycollada/files/pycollada-0.8-numpy-2.patch    | 76 ++++++++++++++++++++++
 ...ycollada-0.8.ebuild => pycollada-0.8-r1.ebuild} |  5 ++
 2 files changed, 81 insertions(+)

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
similarity index 91%
rename from dev-python/pycollada/pycollada-0.8.ebuild
rename to dev-python/pycollada/pycollada-0.8-r1.ebuild
index 6b416a491a78..d565b4949a52 100644
--- a/dev-python/pycollada/pycollada-0.8.ebuild
+++ b/dev-python/pycollada/pycollada-0.8-r1.ebuild
@@ -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
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pycollada/files/, dev-python/pycollada/
@ 2025-03-08 10:50 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2025-03-08 10:50 UTC (permalink / raw
  To: gentoo-commits

commit:     6df7919fd9ab341e0b932969bc8004479957486a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  8 10:48:08 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar  8 10:50:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6df7919f

dev-python/pycollada: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pycollada/Manifest                      |  1 -
 .../pycollada/files/pycollada-0.8-numpy-2.patch    | 76 ----------------------
 dev-python/pycollada/pycollada-0.8-r1.ebuild       | 58 -----------------
 3 files changed, 135 deletions(-)

diff --git a/dev-python/pycollada/Manifest b/dev-python/pycollada/Manifest
index c3234d27c1cb..407e5ffe1b82 100644
--- a/dev-python/pycollada/Manifest
+++ b/dev-python/pycollada/Manifest
@@ -1,2 +1 @@
-DIST pycollada-0.8.gh.tar.gz 3586706 BLAKE2B 533a2a309b4c7ee60671edfd241b80e7128330b2cd85d2707fc4f83b0aceb2d792d8efec77f9a6a8600eec0704878a4342449fde68f77e42617eff30965973a5 SHA512 7171469b8434a7c24ec2ebadefa9ad5268382659cb5b2b3712cf0ba73c7948e7fa4061ecfa02001862c76e1139293ab68cf425472222348e28efa28bc75f844f
 DIST pycollada-0.9.gh.tar.gz 3587769 BLAKE2B 0b0cbb7b99e90e6a51958f0ff98a50caff2fdeb5f96ff7f8d46be1b8dee20a738e2a2d480785a772e391f2730820b1720ffd9880e14505ea6d2d9b4d95e0f711 SHA512 5ce2833ef5b823139b8ceca17a70dd22c02562cd58b38c88cad4e7b06ea9eb3842073c4e1e97c37b83e3798288fc016fd6244baf5cce183989edaf0c35eca3aa

diff --git a/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch b/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch
deleted file mode 100644
index 4ffb80a8b61e..000000000000
--- a/dev-python/pycollada/files/pycollada-0.8-numpy-2.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-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-r1.ebuild b/dev-python/pycollada/pycollada-0.8-r1.ebuild
deleted file mode 100644
index 6468d680d9fc..000000000000
--- a/dev-python/pycollada/pycollada-0.8-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python library for reading and writing COLLADA documents"
-HOMEPAGE="
-	https://pycollada.readthedocs.io/
-	https://github.com/pycollada/pycollada/
-	https://pypi.org/project/pycollada/
-"
-SRC_URI="
-	https://github.com/pycollada/pycollada/archive/v${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm64 ~x86"
-IUSE="examples"
-
-RDEPEND="
-	dev-python/lxml[${PYTHON_USEDEP}]
-	dev-python/numpy[${PYTHON_USEDEP}]
-	>=dev-python/python-dateutil-2.2[${PYTHON_USEDEP}]
-"
-
-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
-
-python_install_all() {
-	if use examples ; then
-		insinto /usr/share/${PF}/
-		doins -r examples
-	fi
-
-	distutils-r1_python_install_all
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# ensure data files for tests are getting installed too
-	python_moduleinto collada/tests/
-	python_domodule collada/tests/data
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-08 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-08 10:50 [gentoo-commits] repo/gentoo:master commit in: dev-python/pycollada/files/, dev-python/pycollada/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-05-24 11:09 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox