Commit 0ee15b18 authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanups

parent 88c8b9a6
...@@ -309,11 +309,12 @@ def resolve_depends(depends, include_dirs): ...@@ -309,11 +309,12 @@ def resolve_depends(depends, include_dirs):
@cached_function @cached_function
def resolve_depend(depend, include_dirs): def resolve_depend(depend, include_dirs):
if depend[0] == '<' and depend[-1] == '>': if depend[0] == '<' and depend[-1] == '>':
return return None
for dir in include_dirs: for dir in include_dirs:
path = join_path(dir, depend) path = join_path(dir, depend)
if path_exists(path): if path_exists(path):
return os.path.normpath(path) return os.path.normpath(path)
return None
@cached_function @cached_function
def parse_dependencies(source_filename): def parse_dependencies(source_filename):
...@@ -481,7 +482,7 @@ class DependencyTree(object): ...@@ -481,7 +482,7 @@ class DependencyTree(object):
externs = self.cimports_and_externs(filename)[1] externs = self.cimports_and_externs(filename)[1]
if externs: if externs:
if 'depends' in info.values: if 'depends' in info.values:
info.values['depends'] = list(set(info.values['depends']).union(set(externs))) info.values['depends'] = list(set(info.values['depends']).union(externs))
else: else:
info.values['depends'] = list(externs) info.values['depends'] = list(externs)
return info return info
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment