From: Dmitry Selyutin Date: Thu, 5 Jul 2018 18:57:52 +0000 (+0300) Subject: more fixes regarding --lgpl option X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d66bbe8d5df5fc43b10eaa4534b533e16fa8d8f1;p=gnulib.git more fixes regarding --lgpl option --- diff --git a/pygnulib/config.py b/pygnulib/config.py index 9021fd2889..425ec3c08c 100644 --- a/pygnulib/config.py +++ b/pygnulib/config.py @@ -520,7 +520,7 @@ class CachedConfig(BaseConfig): match = pattern.findall(data) if match and key not in explicit: if key == "licenses": - self[key] = { + self["licenses"] = { "2": LGPLv2_LICENSE, "3": LGPLv3_LICENSE, "yes": LGPL_LICENSES, diff --git a/pygnulib/generator.py b/pygnulib/generator.py index 20c3c73959..c9b76590ea 100644 --- a/pygnulib/generator.py +++ b/pygnulib/generator.py @@ -446,8 +446,9 @@ def command_line(config, explicit, **override): yield option for module in config.avoids: yield f"--avoid={module}" - if tuple(config.licenses) in _LGPL: - lgpl = _LGPL[tuple(config.licenses)] + licenses = tuple(sorted(config.licenses)) + if licenses in _LGPL: + lgpl = _LGPL[licenses] if lgpl != "yes": yield f"--lgpl={lgpl}" else: @@ -942,8 +943,9 @@ def gnulib_cache(config, explicit): if config.tests: yield "gl_WITH_TESTS" yield "gl_LIB([{}])".format(config.libname) - if tuple(config.licenses) in _LGPL: - lgpl = _LGPL[tuple(sorted(config.licenses))] + licenses = tuple(sorted(config.licenses)) + if licenses in _LGPL: + lgpl = _LGPL[licenses] if lgpl != "yes": yield f"gl_LGPL([{lgpl}])" else: