Skip to content

Commit

Permalink
Pass gracefully if dpkg-architecture is not installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed May 9, 2015
1 parent 3f7f984 commit 28476aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonlib.py
Expand Up @@ -132,9 +132,11 @@ def version_compare(vstr1, vstr2):
return cmpop(varr1, varr2)

def default_libdir():
if os.path.isfile('/etc/debian_version'):
try:
archpath = subprocess.check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH']).decode().strip()
return 'lib/' + archpath
except FileNotFoundError:
pass
if os.path.isdir('/usr/lib64'):
return 'lib64'
return 'lib'
Expand Down

0 comments on commit 28476aa

Please sign in to comment.