Mercurial > gnulib
changeset 39040:440c72b5b26e
pygnulib.py: instantiate root and local VFS
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Thu, 19 Oct 2017 10:11:05 +0300 |
parents | cf5c7b3ad70b |
children | 0aea72c5cc87 |
files | pygnulib.py |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib.py Thu Oct 19 10:10:13 2017 +0300 +++ b/pygnulib.py Thu Oct 19 10:11:05 2017 +0300 @@ -144,8 +144,30 @@ old_files = frozenset(cache.files) new_files = frozenset(files | set(["m4/gnulib-tool.m4"])) + table = { + "build-aux": config.auxdir, + "doc": config.doc_base, + "lib": config.source_base, + "m4": config.m4_base, + "tests": config.tests_base, + "tests=lib": config.tests_base, + "po": config.po_base, + } + table = {k:v for k,v in table.items() if v} + table["top"] = "" + root = BaseVFS(config.root, **table) + local = BaseVFS(config.local, **table) + for prefix in table: + os.makedirs(root[prefix], exist_ok=True) + + + # First the files that are in old-files, but not in new-files: removed_files = {file for file in old_files if file not in new_files} + + # Then the files that are in new-files, but not in old-files: added_files = {file for file in new_files if file not in old_files} + + # Then the files that are in new-files and in old-files: kept_files = (old_files & new_files) return os.EX_OK