backends: Simplify loop getting rpaths for bundled libs

No functionality changes
pull/3385/merge
Nirbheek Chauhan 7 years ago committed by Nirbheek Chauhan
parent 165da6fb65
commit fecd580687
  1. 6
      mesonbuild/backend/backends.py

@ -334,9 +334,11 @@ class Backend:
def rpaths_for_bundled_shared_libraries(self, target): def rpaths_for_bundled_shared_libraries(self, target):
paths = [] paths = []
for dep in target.external_deps: for dep in target.external_deps:
if isinstance(dep, (dependencies.ExternalLibrary, dependencies.PkgConfigDependency)): if not isinstance(dep, (dependencies.ExternalLibrary, dependencies.PkgConfigDependency)):
continue
la = dep.link_args la = dep.link_args
if len(la) == 1 and os.path.isabs(la[0]): if len(la) != 1 or not os.path.isabs(la[0]):
continue
# The only link argument is an absolute path to a library file. # The only link argument is an absolute path to a library file.
libpath = la[0] libpath = la[0]
if libpath.startswith(('/usr/lib', '/lib')): if libpath.startswith(('/usr/lib', '/lib')):

Loading…
Cancel
Save