From e2d15e5c893e42b32a840a6641d5fa8cef7b4f7c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 3 Aug 2022 16:49:15 +0200 Subject: gnulib-tool.py: Follow gnulib-tool changes, part 23. Follow gnulib-tool changes 2016-11-11 Bruno Haible gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license. 2016-12-02 Nikos Mavrogiannopoulos gnulib-tool (func_import): Adhere to the license guideline ... 2016-12-02 Daiki Ueno gnulib-tool (func_import): Relax the regex ... * gnulib-tool.py: For --lgpl, accept value 3orGPLv2. * pygnulib/GLInfo.py (GLInfo.usage): Update. * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check. * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache): Update gl_LGPL handling. (GLImport.prepare): Update license compatibility checks and license header rewriting. * pygnulib/GLTestDir.py (GLTestDir.execute): Update license compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+. --- pygnulib/GLTestDir.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'pygnulib/GLTestDir.py') diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 83555faad7..29c3010ce0 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -195,13 +195,19 @@ class GLTestDir(object): if license not in ['GPLv2+ build tool', 'GPLed build tool', 'public domain', 'unlimited', 'unmodifiable license text']: incompatible = False - if requested_licence == 'GPLv2+': - if license not in ['GPLv2+', 'LGPLv2+']: + if requested_licence == 'GPLv3+' or requested_licence == 'GPL': + if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'LGPLv3+', 'LGPL', 'GPLv2+', 'GPLv3+', 'GPL']: incompatible = True - elif requested_licence in ['LGPL']: - if license not in ['LGPL', 'LGPLv2+']: + elif requested_licence == 'GPLv2+': + if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'GPLv2+']: incompatible = True - elif requested_licence in ['LGPLv2+']: + elif requested_licence == 'LGPLv3+' or requested_licence == 'LGPL': + if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'LGPLv3+', 'LGPL']: + incompatible = True + elif requested_licence == 'LGPLv3+ or GPLv2': + if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2']: + incompatible = True + elif requested_licence == 'LGPLv2+': if license not in ['LGPLv2+']: incompatible = True if incompatible: -- cgit v1.2.1