comparison pygnulib/generator.py @ 39136:25eedd702b46

more fixes regarding --lgpl option
author Dmitry Selyutin <ghostmansd@gmail.com>
date Thu, 05 Jul 2018 21:57:52 +0300
parents 01e983399117
children 6289200390d5
comparison
equal deleted inserted replaced
39135:01e983399117 39136:25eedd702b46
444 option = hook(value) 444 option = hook(value)
445 if option is not None: 445 if option is not None:
446 yield option 446 yield option
447 for module in config.avoids: 447 for module in config.avoids:
448 yield f"--avoid={module}" 448 yield f"--avoid={module}"
449 if tuple(config.licenses) in _LGPL: 449 licenses = tuple(sorted(config.licenses))
450 lgpl = _LGPL[tuple(config.licenses)] 450 if licenses in _LGPL:
451 lgpl = _LGPL[licenses]
451 if lgpl != "yes": 452 if lgpl != "yes":
452 yield f"--lgpl={lgpl}" 453 yield f"--lgpl={lgpl}"
453 else: 454 else:
454 yield "--lgpl" 455 yield "--lgpl"
455 for (key, hook) in __COMMAND_LINE_MISC: 456 for (key, hook) in __COMMAND_LINE_MISC:
940 yield f"gl_DOC_BASE([{config.doc_base}])" 941 yield f"gl_DOC_BASE([{config.doc_base}])"
941 yield f"gl_TESTS_BASE([{config.tests_base}])" 942 yield f"gl_TESTS_BASE([{config.tests_base}])"
942 if config.tests: 943 if config.tests:
943 yield "gl_WITH_TESTS" 944 yield "gl_WITH_TESTS"
944 yield "gl_LIB([{}])".format(config.libname) 945 yield "gl_LIB([{}])".format(config.libname)
945 if tuple(config.licenses) in _LGPL: 946 licenses = tuple(sorted(config.licenses))
946 lgpl = _LGPL[tuple(sorted(config.licenses))] 947 if licenses in _LGPL:
948 lgpl = _LGPL[licenses]
947 if lgpl != "yes": 949 if lgpl != "yes":
948 yield f"gl_LGPL([{lgpl}])" 950 yield f"gl_LGPL([{lgpl}])"
949 else: 951 else:
950 yield "gl_LGPL([])" 952 yield "gl_LGPL([])"
951 if config.makefile_name: 953 if config.makefile_name: