From b3373a01460d10b50754f11b118bef7cd378259d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 12 Apr 2024 19:10:33 +0200 Subject: [PATCH] gnulib-tool.py: Accept conditional dependencies with tests. * pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination of gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS. * pygnulib/GLError.py (GLError.__repr__): Remove error 10. * pygnulib/main.py (main_with_exception_handling): Likewise. --- ChangeLog | 8 ++++++++ pygnulib/GLError.py | 3 --- pygnulib/GLImport.py | 4 ---- pygnulib/main.py | 2 -- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30913f914e..c5c7dae203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-12 Bruno Haible + + gnulib-tool.py: Accept conditional dependencies with tests. + * pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination + of gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS. + * pygnulib/GLError.py (GLError.__repr__): Remove error 10. + * pygnulib/main.py (main_with_exception_handling): Likewise. + 2024-04-12 Bruno Haible gnulib-tool.py: Fix handling of --with-obsolete. diff --git a/pygnulib/GLError.py b/pygnulib/GLError.py index a4c835f43e..a990c382b1 100644 --- a/pygnulib/GLError.py +++ b/pygnulib/GLError.py @@ -53,7 +53,6 @@ class GLError(Exception): 7: missing docbase argument 8: missing testsbase argument 9: missing libname argument - 10: conddeps are not supported with inctests 11: incompatible licenses on modules: 12: cannot process empty filelist 13: cannot create the given directory: @@ -93,8 +92,6 @@ class GLError(Exception): message = "missing testsbase argument; cache file doesn't contain it, so you might have to set this argument" elif errno == 9: message = "missing libname argument; cache file doesn't contain it, so you might have to set this argument" - elif errno == 10: - message = 'conddeps are not supported with inctests' elif errno == 11: message = 'incompatible licenses on modules: %s' % repr(errinfo) elif errno == 12: diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index bc575eaa1f..31380a0108 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -244,10 +244,6 @@ class GLImport: elif self.mode == MODES['update']: modules = self.cache.getModules() - # If user tries to apply conddeps and TESTS['tests'] together. - if self.config.checkInclTestCategory(TESTS['tests']) and self.config['conddeps']: - raise GLError(10, None) - # Update configuration dictionary. self.config.update(self.cache) for key in config.keys(): diff --git a/pygnulib/main.py b/pygnulib/main.py index 08c4c89cf8..f654d5b109 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -1413,8 +1413,6 @@ def main_with_exception_handling() -> None: message += 'missing --tests-base option' elif errno == 9: message += 'missing --lib option' - elif errno == 10: - message = 'gnulib-tool: option --conditional-dependencies is not supported with --with-tests' elif errno == 11: incompatibilities = '' message += 'incompatible license on modules:%s' % constants.NL -- 2.39.5