>From d528738ac3449ce1c4897882e6032eb3a3e929e2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 7 Aug 2022 22:59:08 +0200 Subject: [PATCH 16/19] gnulib-tool.py: Rename a method. * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed from GLModule.getAutoconfSnippet_Early. * pygnulib/GLImport.py: Update. * pygnulib/GLTestDir.py: Likewise. --- ChangeLog | 6 ++++++ pygnulib/GLImport.py | 2 +- pygnulib/GLModuleSystem.py | 4 ++-- pygnulib/GLTestDir.py | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 305d02be51..1278d8e4d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2022-08-07 Bruno Haible + gnulib-tool.py: Rename a method. + * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed + from GLModule.getAutoconfSnippet_Early. + * pygnulib/GLImport.py: Update. + * pygnulib/GLTestDir.py: Likewise. + gnulib-tool.py: Fix section extraction from module descriptions. The code with self.content.split(section)[-1] was broken because it recognizes an indented section label. diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 818f3d57c0..87d85c5181 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -606,7 +606,7 @@ AC_DEFUN([%s_EARLY], emit += ' AC_REQUIRE([AM_PROG_CC_C_O])\n' for module in moduletable['final']: emit += ' # Code from module %s:\n' % str(module) - snippet = module.getAutoconfSnippet_Early() + snippet = module.getAutoconfEarlySnippet() lines = [ line for line in snippet.split(constants.NL) if line != '' ] diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 32a133009a..14bc089b27 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -479,8 +479,8 @@ class GLModule(object): self.cache['dependencies'] = result return self.cache['dependencies'] - def getAutoconfSnippet_Early(self): - '''GLModule.getAutoconfSnippet_Early() -> str + def getAutoconfEarlySnippet(self): + '''GLModule.getAutoconfEarlySnippet() -> str Return autoconf-early snippet.''' return self.sections.get('configure.ac-early', '') diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 9a3fde66ea..746b815b49 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -456,7 +456,7 @@ class GLTestDir(object): pass # if str(module) not in ['gnumakefile', 'maintainer-makefile'] else: - snippet = module.getAutoconfSnippet_Early() + snippet = module.getAutoconfEarlySnippet() lines = [ line for line in snippet.split('\n') if line.strip() ] @@ -573,7 +573,7 @@ class GLTestDir(object): else: # if not single_configure solution = module.isNonTests() if solution: - snippet = module.getAutoconfSnippet_Early() + snippet = module.getAutoconfEarlySnippet() lines = [ line for line in snippet.split('\n') if line.strip() ] -- 2.34.1