cpython: 5966c206654b (original) (raw)
Mercurial > cpython
changeset 78462:5966c206654b
- Issue #11715: Fix multiarch detection without having Debian development tools (dpkg-dev) installed. [#11715]
doko@ubuntu.com | |
---|---|
date | Wed, 08 Aug 2012 12:15:55 +0200 |
parents | 59223da36dec |
children | e0f3406c43e4 |
files | Misc/NEWS setup.py |
diffstat | 2 files changed, 24 insertions(+), 0 deletions(-)[+] [-] Misc/NEWS 3 setup.py 21 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -312,6 +312,9 @@ Tests Build ----- +- Issue #11715: Fix multiarch detection without having Debian development
- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries to avoid curses.unget_wch bug present in older versions of ncurses such as those shipped with OS X.
--- a/setup.py +++ b/setup.py @@ -379,6 +379,27 @@ class PyBuildExt(build_ext): def add_multiarch_paths(self): # Debian/Ubuntu multiarch support. # https://wiki.ubuntu.com/MultiarchSpec[](#l2.6)
cc = sysconfig.get_config_var('CC')[](#l2.7)
tmpfile = os.path.join(self.build_temp, 'multiarch')[](#l2.8)
if not os.path.exists(self.build_temp):[](#l2.9)
os.makedirs(self.build_temp)[](#l2.10)
ret = os.system([](#l2.11)
'%s -print-multiarch > %s 2> /dev/null' % (cc, tmpfile))[](#l2.12)
multiarch_path_component = ''[](#l2.13)
try:[](#l2.14)
if ret >> 8 == 0:[](#l2.15)
with open(tmpfile) as fp:[](#l2.16)
multiarch_path_component = fp.readline().strip()[](#l2.17)
finally:[](#l2.18)
os.unlink(tmpfile)[](#l2.19)
if multiarch_path_component != '':[](#l2.21)
add_dir_to_list(self.compiler.library_dirs,[](#l2.22)
'/usr/lib/' + multiarch_path_component)[](#l2.23)
add_dir_to_list(self.compiler.include_dirs,[](#l2.24)
'/usr/include/' + multiarch_path_component)[](#l2.25)
return[](#l2.26)
+ if not find_executable('dpkg-architecture'): return opt = ''