2022-08-03 Bruno Haible <bruno@clisp.org>
+ 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.
+
gnulib-tool.py: Follow gnulib-tool changes, part 21.
Follow gnulib-tool change
2016-10-16 Bruno Haible <bruno@clisp.org>
--------------------------------------------------------------------------------
-commit ff9debcf75301805b1db925cdcdfb248541c576d
-Author: Bruno Haible <bruno@clisp.org>
-Date: Sat Oct 15 15:51:20 2016 +0200
-
- Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
-
- * gnulib-tool (func_get_license): Special-case the 'parse-datetime'
- module.
-
---------------------------------------------------------------------------------
-
commit 9bdf6c8a0cdeb13c12e4b65dee9538c5468dbe1d
Author: Bruno Haible <bruno@clisp.org>
Date: Sun Aug 19 14:06:50 2012 +0200
'''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