diff options
author | lck <backup.rlacko@gmail.com> | 2012-10-20 16:45:35 +0200 |
---|---|---|
committer | lck <backup.rlacko@gmail.com> | 2012-10-20 16:45:35 +0200 |
commit | b8cd524f61072ba7922d2208031985b74edc9406 (patch) | |
tree | 29286a035d84967debe2dfa9db67862ba604604f /setup.py | |
parent | 2b3dcbadab69cb12c9d9fcb81463e11a282573a7 (diff) |
Fix building on Ubuntu 13.04
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -314,9 +314,25 @@ class pyside_build(_build): break libs_tried.append(py_library) else: - raise DistutilsSetupError( - "Failed to locate the Python library with %s" % - ', '.join(libs_tried)) + py_multiarch = get_config_var("MULTIARCH") + if py_multiarch: + try_py_libdir = os.path.join(py_libdir, py_multiarch) + libs_tried = [] + for lib_ext in lib_exts: + lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext) + py_library = os.path.join(try_py_libdir, lib_name) + if os.path.exists(py_library): + py_libdir = try_py_libdir + break + libs_tried.append(py_library) + else: + raise DistutilsSetupError( + "Failed to locate the Python library with %s" % + ', '.join(libs_tried)) + else: + raise DistutilsSetupError( + "Failed to locate the Python library with %s" % + ', '.join(libs_tried)) if py_library.endswith('.a'): # Python was compiled as a static library log.error("Failed to locate a dynamic Python library, using %s" |