minor code cleanups 0.19rc1
authorStefan Behnel <stefan_ml@behnel.de>
Wed, 17 Apr 2013 06:35:40 +0000 (08:35 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Wed, 17 Apr 2013 06:35:40 +0000 (08:35 +0200)
Cython/Build/Dependencies.py

index 466cb76..3c04f72 100644 (file)
@@ -309,11 +309,12 @@ def resolve_depends(depends, include_dirs):
 @cached_function
 def resolve_depend(depend, include_dirs):
     if depend[0] == '<' and depend[-1] == '>':
-        return
+        return None
     for dir in include_dirs:
         path = join_path(dir, depend)
         if path_exists(path):
             return os.path.normpath(path)
+    return None
 
 @cached_function
 def parse_dependencies(source_filename):
@@ -481,7 +482,7 @@ class DependencyTree(object):
         externs = self.cimports_and_externs(filename)[1]
         if externs:
             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:
                 info.values['depends'] = list(externs)
         return info