diff options
author | Bruno Haible <bruno@clisp.org> | 2022-08-04 12:40:04 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-08-04 12:40:04 +0200 |
commit | 353460b98e53e4244379d5526a2de5f42301e227 (patch) | |
tree | e550022cd6aa25f12e5f5a1bd86faee72abb89b0 /pygnulib/GLImport.py | |
parent | e7101c252c537dd198af9329d861c353241bcb61 (diff) | |
download | gnulib-353460b98e53e4244379d5526a2de5f42301e227.tar.gz |
gnulib-tool.py: Implement option --avoid.
* pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Compute the
effective avoids list here.
(GLModuleTable.transitive_closure, GLModuleTable.add_dummy): Consider
the avoids list.
* pygnulib/GLImport.py (GLImport.gnulib_cache): Use the avoids list from
GLConfig directly.
(GLImport.prepare): No need any more to set the avoids list in the
GLModuleTable.
Diffstat (limited to 'pygnulib/GLImport.py')
-rw-r--r-- | pygnulib/GLImport.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 58b8eaab9f..28bef1d9f3 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -494,7 +494,7 @@ class GLImport(object): witness_c_macro = self.config['witness_c_macro'] vc_files = self.config['vc_files'] modules = [str(module) for module in moduletable['base']] - avoids = [str(avoid) for avoid in moduletable['avoids']] + avoids = self.config['avoids'] emit += self.emiter.copyright_notice() emit += '''# # This file represents the specification of how gnulib-tool is used. @@ -578,7 +578,6 @@ class GLImport(object): vc_files = self.config['vc_files'] libtests = self.config['libtests'] modules = [str(module) for module in moduletable['base']] - avoids = [str(avoid) for avoid in moduletable['avoids']] emit += '# DO NOT EDIT! GENERATED AUTOMATICALLY!\n' emit += self.emiter.copyright_notice() emit += '''# @@ -762,7 +761,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix destdir = self.config['destdir'] auxdir = self.config['auxdir'] modules = list(self.config['modules']) - avoids = list(self.config['avoids']) sourcebase = self.config['sourcebase'] m4base = self.config['m4base'] pobase = self.config['pobase'] @@ -783,10 +781,8 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix verbose = self.config['verbosity'] base_modules = sorted( set([self.modulesystem.find(m) for m in modules])) - avoids = sorted(set([self.modulesystem.find(a) for a in avoids])) # Perform transitive closure. - self.moduletable.setAvoids(avoids) final_modules = self.moduletable.transitive_closure(base_modules) # Show final module list. @@ -1001,7 +997,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix destdir = self.config['destdir'] auxdir = self.config['auxdir'] modules = list(self.config['modules']) - avoids = list(self.config['avoids']) sourcebase = self.config['sourcebase'] m4base = self.config['m4base'] pobase = self.config['pobase'] |