setup: fix cython rebuilding all graphics even if it has been already done. Closes #4849

This commit is contained in:
Mathieu Virbel 2017-08-15 12:38:53 +02:00
parent 0ea6e95df6
commit d462a70f99
1 changed files with 17 additions and 1 deletions

View File

@ -867,7 +867,23 @@ def resolve_dependencies(fn, depends):
deps = []
get_dependencies(fn, deps)
get_dependencies(fn.replace('.pyx', '.pxd'), deps)
return [expand(src_path, 'graphics', x) for x in deps]
deps_final = []
paths_to_test = ['graphics', 'include']
for dep in deps:
found = False
for path in paths_to_test:
filename = expand(src_path, path, dep)
if exists(filename):
deps_final.append(filename)
found = True
break
if not found:
print('ERROR: Dependency for {} not resolved: {}'.format(
fn, dep
))
return deps_final
def get_extensions_from_sources(sources):