* pygnulib/constants.py: Import codecs.
* pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable
reference.
* pygnulib/GLFileSystem.py (GLFileSystem.lookup,
GLFileAssistant.update): Fix local variable references.
* pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference.
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local
variables.
2022-08-05 Bruno Haible <bruno@clisp.org>
+ gnulib-tool.py: Fix 'Undefined variable' errors.
+ * pygnulib/constants.py: Import codecs.
+ * pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable
+ reference.
+ * pygnulib/GLFileSystem.py (GLFileSystem.lookup,
+ GLFileAssistant.update): Fix local variable references.
+ * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference.
+ * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local
+ variables.
+
gnulib-tool.py: Make option --version work.
* pygnulib/constants.py (__copyright__): Bump copyright year.
* pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the
self.table['libname'] = libname
else: # if type of libname is not str
raise TypeError('libname must be a string, not %s'
- % type(module).__name__)
+ % type(libname).__name__)
def resetLibName(self):
'''Reset the library name to 'libgnu'.'''
emit = ''
sourcebase = self.config['sourcebase']
sourcebase = '%s%s' % (self.sourcebase, os.path.sep)
- files = [ substart('lib/', sourcebase, file)
+ files = [ constants.substart('lib/', sourcebase, file)
for file in files ]
files = [ file
for file in files
GLConfig: localpath.'''
if type(name) is not str:
raise TypeError('name must be a string, not %s'
- % type(module).__name__)
+ % type(name).__name__)
localpath = self.config['localpath']
# Each element in localpath is a directory whose contents overrides
# or amends the result of the lookup in the rest of localpath and
raise GLError(17, original)
else: # if self.config['dryrun']
if already_present:
- print('Update file %s (backup in %s)' % (rewritten, backup))
+ print('Update file %s (backup in %s)' % (rewritten, backupname))
else: # if not already_present
- print('Replace file %s (backup in %s)' % (rewritten, backup))
+ print('Replace file %s (backup in %s)' % (rewritten, backupname))
def add_or_update(self, already_present):
'''GLFileAssistant.add_or_update(already_present)
Create a mega scratch package with the given modules one by one and all
together.'''
+ auxdir = self.config['auxdir']
+ verbose = self.config['verbosity']
+
megasubdirs = list()
modules = [ self.modulesystem.find(m)
for m in self.config['modules'] ]
import platform
import shutil
import tempfile
+import codecs
import subprocess as sp
import __main__ as interpreter