From b2243e438b952d1559c0d9d53128d154bb70cdaa Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 20 Mar 2018 17:56:14 +0100 Subject: [PATCH 1/3] `try_skip` method can now take an extra name. Useful if different "skip_files" are stored in the same directory. --- utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index f4ace50..e5e9718 100644 --- a/utils.py +++ b/utils.py @@ -137,8 +137,10 @@ class Context: self.force_native_build = force_native_build self.autoskip_file = None - def try_skip(self, path): - self.autoskip_file = pj(path, ".{}_ok".format(self.command_name)) + def try_skip(self, path, extra_name=""): + if extra_name: + extra_name = "_{}".format(extra_name) + self.autoskip_file = pj(path, ".{}{}_ok".format(self.command_name, extra_name)) if os.path.exists(self.autoskip_file): raise SkipCommand() From 5cc30cf4f29986faac507b8327fe7ba25f3f9048 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 20 Mar 2018 17:56:40 +0100 Subject: [PATCH 2/3] Use a skip file to skip download of archives. --- dependency_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dependency_utils.py b/dependency_utils.py index d218974..67661cf 100644 --- a/dependency_utils.py +++ b/dependency_utils.py @@ -111,6 +111,7 @@ class ReleaseDownload(Source): return pj(self.buildEnv.source_dir, self.source_dir) def _download(self, context): + context.try_skip(self.buildEnv.archive_dir, self.name) self.buildEnv.download(self.archive) def _extract(self, context): From 8d13ad5de7a72c61ae904c1d10e9c81d194d6d5b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 20 Mar 2018 17:57:39 +0100 Subject: [PATCH 3/3] Do not store archive is the base dep archive. Now that we use a skip file to skip download, we don't need to store all the archives but just the skip file. --- travis/compile_all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/compile_all.py b/travis/compile_all.py index 1f068e5..8202fa2 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -111,7 +111,7 @@ def make_deps_archive(target, full=False): relative_path = BASE_DIR if full: - files_to_archive += [ARCHIVE_DIR] + files_to_archive += ARCHIVE_DIR.glob(".*_ok") files_to_archive += BASE_DIR.glob('*/.*_ok') files_to_archive += SOURCE_DIR.glob('*/.*_ok') files_to_archive += [SOURCE_DIR/'pugixml-{}'.format(