1
Description: Add multiarch search directory as given by dpkg-architecture so
2
that the zlib library can be found. Without this, zip_decoder and
3
zip_encoder are not included in the _imaging module. Problem found and patch
4
inspired by Marc Tardif (cr3).
5
Author: Barry Warsaw <barry@python.org>
6
Bug-Ubuntu: http://pad.lv/806661
13
import glob, os, re, struct, string, sys
15
+from distutils.spawn import find_executable
17
# make it possible to run the setup script from another directory
20
add_directory(library_dirs, "/opt/local/lib")
21
add_directory(include_dirs, "/opt/local/include")
23
+ elif find_executable('dpkg-architecture'):
24
+ # Debian/Ubuntu multiarch support.
25
+ proc = subprocess.Popen(
26
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH'.split(),
27
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
28
+ stdout, stderr = proc.communicate()
29
+ multiarch_path = stdout.strip()
30
+ add_directory(include_dirs, '/usr/include/' + multiarch_path)
31
+ add_directory(library_dirs, '/usr/lib/' + multiarch_path)
33
add_directory(library_dirs, "/usr/local/lib")
34
# FIXME: check /opt/stuff directories here?