Bug#1114710: pylibtiff: FTBFS with NumPy 2.3
roehling at debian.org
roehling at debian.org
Mon Sep 8 20:44:29 BST 2025
Source: pylibtiff
Version: 0.6.1-2
Severity: important
User: debian-python at lists.debian.org
Usertags: numpy2.3
Tags: ftbfs, forky, sid
Dear maintainer,
During a test rebuild for NumPy 2.3, pylibtiff failed to rebuild.
Log Summary:
-------------------------------------------------------------------------------
[...]
creating build/bdist.linux-x86_64/wheel/libtiff/scripts
copying build/lib.linux-x86_64-cpython-313/libtiff/scripts/__init__.py -> build/bdist.linux-x86_64/wheel/./libtiff/scripts
copying build/lib.linux-x86_64-cpython-313/libtiff/scripts/info.py -> build/bdist.linux-x86_64/wheel/./libtiff/scripts
copying build/lib.linux-x86_64-cpython-313/libtiff/scripts/convert.py -> build/bdist.linux-x86_64/wheel/./libtiff/scripts
running install_egg_info
Copying pylibtiff.egg-info to build/bdist.linux-x86_64/wheel/./pylibtiff-0.6.1.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pylibtiff-0.6.1.dist-info/WHEEL
creating '/build/reproducible-path/pylibtiff-0.6.1/.pybuild/cpython3_3.13/.tmp-8573s1bv/pylibtiff-0.6.1-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'libtiff/__init__.py'
adding 'libtiff/bittools.cpython-313-x86_64-linux-gnu.so'
adding 'libtiff/libtiff_ctypes.py'
adding 'libtiff/lsm.py'
adding 'libtiff/lzw.py'
adding 'libtiff/script_options.py'
adding 'libtiff/test_bittools.py'
adding 'libtiff/tif_lzw.cpython-313-x86_64-linux-gnu.so'
adding 'libtiff/tiff.py'
adding 'libtiff/tiff_array.py'
adding 'libtiff/tiff_base.py'
adding 'libtiff/tiff_channels_and_files.py'
adding 'libtiff/tiff_data.py'
adding 'libtiff/tiff_file.py'
adding 'libtiff/tiff_files.py'
adding 'libtiff/tiff_h_3_8_2.py'
adding 'libtiff/tiff_h_3_9_2.py'
adding 'libtiff/tiff_h_3_9_4.py'
adding 'libtiff/tiff_h_3_9_5.py'
adding 'libtiff/tiff_h_4_0_1.py'
adding 'libtiff/tiff_h_4_0_10.py'
adding 'libtiff/tiff_h_4_0_2.py'
adding 'libtiff/tiff_h_4_0_3.py'
adding 'libtiff/tiff_h_4_0_6.py'
adding 'libtiff/tiff_h_4_0_7.py'
adding 'libtiff/tiff_h_4_0_8.py'
adding 'libtiff/tiff_h_4_0_9.py'
adding 'libtiff/tiff_h_4_1_0.py'
adding 'libtiff/tiff_h_4_2_0.py'
adding 'libtiff/tiff_h_4_3_0.py'
adding 'libtiff/tiff_h_4_4_0.py'
adding 'libtiff/tiff_h_4_5_0.py'
adding 'libtiff/tiff_h_4_6_0.py'
adding 'libtiff/tiff_image.py'
adding 'libtiff/tiff_sample_plane.py'
adding 'libtiff/utils.py'
adding 'libtiff/version.py'
adding 'libtiff/scripts/__init__.py'
adding 'libtiff/scripts/convert.py'
adding 'libtiff/scripts/info.py'
adding 'libtiff/src/bittools.c'
adding 'libtiff/src/tif_lzw.c'
adding 'libtiff/tests/test_libtiff_ctypes.py'
adding 'libtiff/tests/test_lzw.py'
adding 'libtiff/tests/test_simple.py'
adding 'libtiff/tests/test_tiff_array.py'
adding 'libtiff/tests/test_tiff_file.py'
adding 'libtiff/tests/test_tiff_image.py'
adding 'pylibtiff-0.6.1.dist-info/licenses/LICENSE'
adding 'pylibtiff-0.6.1.dist-info/METADATA'
adding 'pylibtiff-0.6.1.dist-info/WHEEL'
adding 'pylibtiff-0.6.1.dist-info/entry_points.txt'
adding 'pylibtiff-0.6.1.dist-info/top_level.txt'
adding 'pylibtiff-0.6.1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pylibtiff-0.6.1-cp313-cp313-linux_x86_64.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /build/reproducible-path/pylibtiff-0.6.1/.pybuild/cpython3_3.13/build; python3.13 -m pytest -k "not test_issue19" /build/reproducible-path/pylibtiff-0.6.1/libtiff/tests
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.2, pluggy-1.6.0
rootdir: /build/reproducible-path/pylibtiff-0.6.1
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 44 items / 1 deselected / 43 selected
../../../libtiff/tests/test_libtiff_ctypes.py . [ 2%]
../../../libtiff/tests/test_lzw.py . [ 4%]
../../../libtiff/tests/test_simple.py .. [ 9%]
../../../libtiff/tests/test_tiff_array.py F [ 11%]
../../../libtiff/tests/test_tiff_file.py . [ 13%]
../../../libtiff/tests/test_tiff_image.py .............................. [ 83%]
....... [100%]
=================================== FAILURES ===================================
_____________________________ test_simple_slicing ______________________________
@pytest.mark.skipif(sys.platform == "darwin", reason="OSX can't resize mmap")
def test_simple_slicing():
for planar_config in [1, 2]:
for compression in [None, 'lzw']:
for itype in [uint8, uint16, uint32, uint64,
int8, int16, int32, int64,
float32, float64,
complex64, complex128]:
image = random.randint(0, 100, size=(10, 6, 7)).astype(itype)
fn = mktemp('.tif')
if 0:
if planar_config == 2:
continue
tif = TIFF.open(fn, 'w')
tif.write_image(image, compression=compression)
tif.close()
else:
tif = TIFFimage(image)
tif.write_file(fn,
compression=compression,
planar_config=planar_config)
del tif
tif = TIFFfile(fn)
> arr = tif.get_tiff_array()
^^^^^^^^^^^^^^^^^^^^
../../../libtiff/tests/test_tiff_array.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
libtiff/tiff_file.py:404: in get_tiff_array
plane = TiffSamplePlane(ifd, sample_index=sample_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
libtiff/tiff_sample_plane.py:104: in __init__
descr = str(ifd.get_value('ImageDescription', human=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <libtiff.tiff_file.IFD object at 0x7f9942edc1a0>
tag_name = 'ImageDescription', default = None, human = True
def get_value(self, tag_name, default=None, human=False):
""" Return the value of IFD entry with given tag name.
When the entry does not exist, return default.
"""
entry = self.get(tag_name)
if entry is not None:
value = entry.value
else:
if default is None:
if tag_name in default_tag_values:
value = default_tag_values[tag_name]
else:
value = None
sys.stdout.write(
'%s.get_value: no default value definedtiff_data.'
'default_tag_values dict for %r IFD tag\n' % (
self.__class__.__name__, tag_name))
else:
value = default
if tag_name in ['StripOffsets', 'StripByteCounts']:
if not isinstance(value, numpy.ndarray):
value = numpy.array([value])
if tag_name in ['BitsPerSample', 'SampleFormat']:
samples_per_pixel = self.get_value('SamplesPerPixel')
if not isinstance(value, numpy.ndarray):
value = numpy.array([value] * samples_per_pixel)
if tag_name in ['BitsPerSample']:
value = value[:samples_per_pixel]
if tag_name in ['ImageDescription', 'Software', 'Copyright',
'DocumentName', 'Model', 'Make', 'PageName',
'DateTime', 'Artist', 'HostComputer']:
if value is not None:
> return value.view('|S{!s}'.format(str(value.nbytes // value.size))).tostring()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E AttributeError: 'numpy.ndarray' object has no attribute 'tostring'
libtiff/tiff_file.py:795: AttributeError
=========================== short test summary info ============================
FAILED ../../../libtiff/tests/test_tiff_array.py::test_simple_slicing - Attri...
================== 1 failed, 42 passed, 1 deselected in 0.30s ==================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /build/reproducible-path/pylibtiff-0.6.1/.pybuild/cpython3_3.13/build; python3.13 -m pytest -k "not test_issue19" /build/reproducible-path/pylibtiff-0.6.1/libtiff/tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
make: *** [debian/rules:19: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2025-09-08T05:59:27Z
-------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/debian/developers-roehling.numpy/artifact/2453866/
About the archive rebuild: The build was made on debusine.debian.net,
using sbuild.
You can find the build task here:
https://debusine.debian.net/debian/developers-roehling.numpy/work-request/163697/
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Cheers
Timo
More information about the Pkg-grass-devel
mailing list