diff options
author | Bruno Haible <bruno@clisp.org> | 2022-08-03 14:51:20 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-08-03 14:51:50 +0200 |
commit | 65349591fb099e8076f477d16704b05ef8233e1c (patch) | |
tree | b24da41e748492355d5ca1ffba30ac3d598555af /pygnulib | |
parent | 10aa0eb755d137e3af13c779da2127a3d0af1c6b (diff) | |
download | gnulib-65349591fb099e8076f477d16704b05ef8233e1c.tar.gz |
gnulib-tool.py: Follow gnulib-tool changes, part 22.
Follow gnulib-tool change
2016-10-15 Bruno Haible <bruno@clisp.org>
Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
* pygnulib/GLModuleSystem.py (GLModule.getLicense): Special-case the
'parse-datetime' module.
Diffstat (limited to 'pygnulib')
-rw-r--r-- | pygnulib/GLModuleSystem.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 319175dee8..25c34f8756 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -796,16 +796,22 @@ Include:|Link:|License:|Maintainer:)' '''GLModule.getLicense(self) -> str Get license and warn user if module lacks a license.''' - license = self.getLicense_Raw() - if not self.isTests(): + if str(self) == 'parse-datetime': + # This module is under a weaker license only for the purpose of some + # users who hand-edit it and don't use gnulib-tool. For the regular + # gnulib users they are under a stricter license. + return 'GPL' + else: + license = self.getLicense_Raw() + if not self.isTests(): + if not license: + if self.config['errors']: + raise GLError(18, str(self)) + else: # if not self.config['errors'] + sys.stderr.write('gnulib-tool: warning: module %s lacks a license\n' % str(self)) if not license: - if self.config['errors']: - raise GLError(18, str(self)) - else: # if not self.config['errors'] - sys.stderr.write('gnulib-tool: warning: module %s lacks a license\n' % str(self)) - if not license: - license = 'GPL' - return license + license = 'GPL' + return license def getLicense_Raw(self): '''GLModule.getLicense_Raw() -> str |