On 1/14/23 18:57, Sebastiaan Couwenberg wrote:
On 1/14/23 18:27, Bas Couwenberg wrote:
python3-pil lost the libtiff dependency after the recent rebuild
during the transition to tiff 4.5.0:
The attached patch resolves the issue by adding support for the tiff.h
multiarch path.
The initial patch uses the DEB_HOST_MULTIARCH environment variable.
The attached patch uses sysconfig.get_config_var('MULTIARCH') which
seems more appropriate for upstreaming:
https://github.com/python-pillow/Pillow/pull/6896
Kind Regards,
Bas
--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
Description: Add support for tiff.h in multiarch path.
Author: Bas Couwenberg <sebas...@debian.org>
Bug-Debian: https://bugs.debian.org/1028904
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@ import re
import struct
import subprocess
import sys
+import sysconfig
import warnings
from setuptools import Extension, setup
@@ -733,6 +734,14 @@ class pil_build_ext(build_ext):
if feature.want("tiff"):
_dbg("Looking for tiff")
+
+ multiarch = sysconfig.get_config_var('MULTIARCH')
+ if multiarch is not None:
+ _add_directory(
+ self.compiler.include_dirs,
+ '/usr/include/%s' % multiarch,
+ )
+
if _find_include_file(self, "tiff.h"):
if _find_library_file(self, "tiff"):
feature.tiff = "tiff"