+2024-02-27 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Follow gnulib-tool changes, part 31.
+ Follow gnulib-tool change
+ 2021-06-04 Bruno Haible <bruno@clisp.org>
+ gnulib-tool: Stop doing license notice replacements.
+ * pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key.
+ (checkCopyrights): Remove function.
+ (setSymbolic, resetSymbolic): Remove 'copyrights' key.
+ * pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
+ Don't modify license notice on source files.
+ (GLImport.execute): Remove copyrights variable.
+
2024-02-27 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Small fix of part 27.
return 2.59
elif key == 'verbosity':
return 0
- elif key == 'copyrights':
- return True
elif key in ['modules', 'avoids', 'tests', 'incl_test_categories', 'excl_test_categories']:
return list()
elif key in ['libtool', 'lgpl', 'gnu_make', 'conddeps', 'symbolic', 'lsymbolic',
'''Specify preferred autoconf version. Default value is 2.59.'''
self.table['ac_version'] = 2.59
- def checkCopyrights(self):
- '''Check if copyright notices in files should be replaced.'''
- return self.table['copyrights']
-
# Define symbolic methods.
def checkSymbolic(self):
'''Check if pygnulib will make symbolic links instead of copying files.'''
'''Enable / disable creation of the symbolic links instead of copying files.'''
if type(value) is bool:
self.table['symbolic'] = value
- self.table['copyrights'] = not value
else: # if type(value) is not bool
raise TypeError('value must be a bool, not %s'
% type(value).__name__)
def resetSymbolic(self):
'''Reset creation of the symbolic links instead of copying files.'''
self.table['symbolic'] = False
- self.table['copyrights'] = True
# Define lsymbolic methods.
def checkLSymbolic(self):
docbase = self.config['docbase']
testsbase = self.config['testsbase']
lgpl = self.config['lgpl']
- copyrights = self.config['copyrights']
libname = self.config['libname']
makefile_name = self.config['makefile_name']
conddeps = self.config['conddeps']
print(notice)
# Determine script to apply to imported library files.
- lgpl2gpl = '''
- s/GNU Lesser General/GNU General/g
- s/Lesser General Public License/General Public License/g
- s/GNU Library General/GNU General/g
- s/Library General Public License/General Public License/g
- s/version 2\\(.1\\)\\{0,1\\}\\([ ,]\\)/version 3\\2/g'''
sed_transform_lib_file = ''
if 'config-h' in [ str(module)
for module in main_modules ]:
s/^#ifdef[\t ]*HAVE_CONFIG_H[\t ]*$/#if 1/
'''
sed_transform_main_lib_file = sed_transform_lib_file
- if copyrights:
- if lgpl: # if lgpl is enabled
- if lgpl == True or lgpl == '3':
- sed_transform_main_lib_file += '''
- s/GNU General/GNU Lesser General/g
- s/General Public License/Lesser General Public License/g
- s/Lesser Lesser General Public License/Lesser General Public License/g'''
- elif lgpl == '3orGPLv2':
- sed_transform_main_lib_file += '''
- /^ *This program is free software/i\\
- This program is free software: you can redistribute it and\\/or\\
- modify it under the terms of either:\\
-\\
- * the GNU Lesser General Public License as published by the Free\\
- Software Foundation; either version 3 of the License, or (at your\\
- option) any later version.\\
-\\
- or\\
-\\
- * the GNU General Public License as published by the Free\\
- Software Foundation; either version 2 of the License, or (at your\\
- option) any later version.\\
-\\
- or both in parallel, as here.
- /^ *This program is free software/,/^$/d
- '''
- elif lgpl == '2':
- sed_transform_main_lib_file += '''
- s/GNU General/GNU Lesser General/g
- s/General Public License/Lesser General Public License/g
- s/Lesser Lesser General Public License/Lesser General Public License/g
- s/version [23]\\([ ,]\\)/version 2.1\\1/g'''
- else: # if lgpl is disabled
- sed_transform_main_lib_file += lgpl2gpl
# Determine script to apply to auxiliary files that go into $auxdir/.
sed_transform_build_aux_file = ''
- if copyrights:
- sed_transform_build_aux_file += lgpl2gpl
# Determine script to apply to library files that go into $testsbase/.
sed_transform_testsrelated_lib_file = sed_transform_lib_file
- if copyrights:
- sed_transform_testsrelated_lib_file += lgpl2gpl
# Determine the final file lists.
main_filelist, tests_filelist = \
docbase = self.config['docbase']
testsbase = self.config['testsbase']
lgpl = self.config['lgpl']
- copyrights = self.config['copyrights']
libname = self.config['libname']
makefile_name = self.config['makefile_name']
conddeps = self.config['conddeps']