From 4d9bdbf55796620b1c0da6e7fece6b442a5fb8e2 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 1 Apr 2024 19:13:16 -0700 Subject: [PATCH] gnulib-tool.py: Don't default to 'build-aux' for --auxdir. * pygnulib/GLConfig.py (GLConfig.__getitem__): Don't map '' to 'build-aux' for the 'auxdir' key. * pygnulib/GLImport.py (GLImport.__init__): Change conditional to use an empty string instead of None since this is returned when --auxdir is not used. --- ChangeLog | 9 +++++++++ pygnulib/GLConfig.py | 4 ---- pygnulib/GLImport.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c51c94166..e45ecef1ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-04-02 Collin Funk + + gnulib-tool.py: Don't default to 'build-aux' for --auxdir. + * pygnulib/GLConfig.py (GLConfig.__getitem__): Don't map '' to + 'build-aux' for the 'auxdir' key. + * pygnulib/GLImport.py (GLImport.__init__): Change conditional to use an + empty string instead of None since this is returned when --auxdir is not + used. + 2024-04-02 Bruno Haible gnulib-tool: Remove unused variables. diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 63d1d06b1c..716a2cf4d1 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -251,10 +251,6 @@ class GLConfig(object): def __getitem__(self, y: str) -> str | float | int | bool | CopyAction | list[str] | None: '''x.__getitem__(y) <==> x[y]''' if y in self.table: - if y == "auxdir": - if self.table['auxdir']: - return self.table['auxdir'] - return "build-aux" return self.table[y] else: # if y not in self.table raise KeyError('GLConfig does not contain key: %s' % repr(y)) diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 05ce82b7ac..ab740b05ca 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -100,7 +100,7 @@ class GLImport(object): self.cache.setAuxDir(joinpath(self.config['destdir'], result)) pattern = re.compile(r'A[CM]_PROG_LIBTOOL', re.M) guessed_libtool = bool(pattern.findall(data)) - if self.config['auxdir'] == None: + if self.config['auxdir'] == '': self.config.setAuxDir(self.cache['auxdir']) # Guess autoconf version. -- 2.39.5