blasphemy: exclude directories that we know won't contain the library we're looking for, so as to speed it up
This commit is contained in:
parent
5f4d4fcaac
commit
4d7a15ed3b
@ -46,6 +46,10 @@ def find_library(library):
|
|||||||
|
|
||||||
def find_library_in_search_path(library, path):
|
def find_library_in_search_path(library, path):
|
||||||
for (dirpath, dirnames, filenames) in os.walk(path):
|
for (dirpath, dirnames, filenames) in os.walk(path):
|
||||||
|
for name in ["sbin", "bin", "share", "include", "etc", "site-packages", "src", "vendor_ruby", "kernel"]:
|
||||||
|
if name in dirnames:
|
||||||
|
dirnames.remove(name)
|
||||||
|
|
||||||
if library in filenames:
|
if library in filenames:
|
||||||
library_path = os.path.join(dirpath, library)
|
library_path = os.path.join(dirpath, library)
|
||||||
if "ELF 64-bit" in file_type(library_path):
|
if "ELF 64-bit" in file_type(library_path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user