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

handle one more error in cythonize() when ignore-failures mode is requested

parent dcb7d5e5
...@@ -501,7 +501,7 @@ def create_dependency_tree(ctx=None, quiet=False): ...@@ -501,7 +501,7 @@ def create_dependency_tree(ctx=None, quiet=False):
return _dep_tree return _dep_tree
# This may be useful for advanced users? # This may be useful for advanced users?
def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=False): def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=False, exclude_failures=False):
explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)]) explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)])
seen = set() seen = set()
deps = create_dependency_tree(ctx, quiet=quiet) deps = create_dependency_tree(ctx, quiet=quiet)
...@@ -543,7 +543,12 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=Fa ...@@ -543,7 +543,12 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=Fa
else: else:
module_name = name module_name = name
if module_name not in seen: if module_name not in seen:
try:
kwds = deps.distutils_info(file, aliases, base).values kwds = deps.distutils_info(file, aliases, base).values
except Exception:
if exclude_failures:
continue
raise
if base is not None: if base is not None:
for key, value in base.values.items(): for key, value in base.values.items():
if key not in kwds: if key not in kwds:
...@@ -600,6 +605,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo ...@@ -600,6 +605,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
exclude=exclude, exclude=exclude,
ctx=ctx, ctx=ctx,
quiet=quiet, quiet=quiet,
exclude_failures=exclude_failures,
aliases=aliases) aliases=aliases)
deps = create_dependency_tree(ctx, quiet=quiet) deps = create_dependency_tree(ctx, quiet=quiet)
modules_by_cfile = {} modules_by_cfile = {}
......
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