Mercurial > gnulib
changeset 39116:4dce85d628e9
generator: make licenses hashable
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Mon, 02 Jul 2018 01:02:02 +0300 |
parents | aa50b6ed9282 |
children | 6b16480de038 |
files | pygnulib/generator.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/generator.py Sat Jun 30 16:30:26 2018 +0300 +++ b/pygnulib/generator.py Mon Jul 02 01:02:02 2018 +0300 @@ -23,10 +23,10 @@ _LGPL = { - _LGPLv2_LICENSE: "2", - _LGPLv3_LICENSE: "3", - _LGPL_LICENSES: "yes", - (_GPLv2_LICENSE | _LGPLv3_LICENSE): "3orGPLv2", + tuple(_LGPLv2_LICENSE): "2", + tuple(_LGPLv3_LICENSE): "3", + tuple(_LGPL_LICENSES): "yes", + tuple(_GPLv2_LICENSE | _LGPLv3_LICENSE): "3orGPLv2", } __DISCLAIMER = ( "## DO NOT EDIT! GENERATED AUTOMATICALLY!", @@ -446,8 +446,8 @@ yield option for module in config.avoids: yield "--avoid={module.name}" - if frozenset(config.licenses) in _LGPL: - lgpl = _LGPL[config.licenses] + if tuple(config.licenses) in _LGPL: + lgpl = _LGPL[tuple(config.licenses)] if lgpl != "yes": yield f"--lgpl={lgpl}" else: @@ -937,8 +937,8 @@ if config.tests: yield "gl_WITH_TESTS" yield "gl_LIB([{}])".format(config.libname) - if frozenset(config.licenses) in _LGPL: - lgpl = _LGPL[config.licenses] + if tuple(config.licenses) in _LGPL: + lgpl = _LGPL[tuple(config.licenses)] yield "gl_LGPL([{}])".format(lgpl) if lgpl != "yes" else "gl_LGPL" yield f"gl_MAKEFILE_NAME([{config.makefile_name}])" if config.conditionals: