Bug#1080123: Fallout from setuptools dropping the test command
Gregor Riepl
onitake at gmail.com
Sun Feb 9 14:54:15 GMT 2025
> FWIW: I think these bugs were all caused by setuptools v72 dropping
> support for the "test" command, so dh-python has fallen back to
> distutils / other test plugins.
>
> If you're trying to figure out how to fix the bug, look at the
> implementation of test_suite in setup.py to see what magic it does for
> test setup.
It doesn't really do anything in terms of test setup, except for using the deprecated test_suite attribute (see https://setuptools.pypa.io/en/latest/deprecated/commands.html#test ):
test_suite = "collada.tests",
I can get around this issue by adding the test data to package_data (which doesn't seem quite right, but at least it fixes the mentioned ERRORs):
package_data = {
'collada': ['resources/*.xml'],
'collada.tests': ['data/*']
}
However, there's another error that cropped up due to the numpy 2.0 upgrade:
======================================================================
ERROR: test_idref_source_saving (collada.tests.test_source.TestSource.test_idref_source_saving)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/pycollada/.pybuild/cpython3_3.13/build/collada/tests/test_source.py", line 34, in test_idref_source_saving
numpy.array(['Ref1', 'Ref2'], dtype=numpy.string_),
^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 400, in __getattr__
raise AttributeError(
...<3 lines>...
)
AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.
======================================================================
ERROR: test_name_source_saving (collada.tests.test_source.TestSource.test_name_source_saving)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/pycollada/.pybuild/cpython3_3.13/build/collada/tests/test_source.py", line 52, in test_name_source_saving
numpy.array(['Name1', 'Name2'], dtype=numpy.string_),
^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 400, in __getattr__
raise AttributeError(
...<3 lines>...
)
AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.
This should probably be a separate bug report, though.
More information about the debian-science-maintainers
mailing list