From 36af9eecdfb1024383f15dd291e264bd17038aea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Aug 2018 12:39:40 +1000 Subject: [PATCH] waf: fixes for python 3.7 --- Tools/ardupilotwaf/cmake.py | 4 ---- wscript | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Tools/ardupilotwaf/cmake.py b/Tools/ardupilotwaf/cmake.py index 83579636da..5006dea368 100644 --- a/Tools/ardupilotwaf/cmake.py +++ b/Tools/ardupilotwaf/cmake.py @@ -200,10 +200,6 @@ class cmake_build_task(Task.Task): def keyword(self): return 'CMake Build' -# allow tasks to depend on possible headers or other resources if the user -# declares outputs for the cmake build -cmake_build_task = Task.update_outputs(cmake_build_task) - cmake_build_task.original_post_run = cmake_build_task.post_run def _cmake_build_task_post_run(self): self.output_patterns = Utils.to_list(self.output_patterns) diff --git a/wscript b/wscript index aa0a687142..f548f47b4b 100644 --- a/wscript +++ b/wscript @@ -155,11 +155,12 @@ configuration in order to save typing. def _collect_autoconfig_files(cfg): for m in sys.modules.values(): paths = [] - if hasattr(m, '__file__'): + if hasattr(m, '__file__') and m.__file__ is not None: paths.append(m.__file__) elif hasattr(m, '__path__'): for p in m.__path__: - paths.append(p) + if p is not None: + paths.append(p) for p in paths: if p in cfg.files or not os.path.isfile(p):