From: Collin Funk Date: Sat, 20 Apr 2024 06:42:24 +0000 (-0700) Subject: gnulib-tool.py: Remove duplicate per-module definitions. X-Git-Tag: v1.0~28 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=544b6f6e1b2cbb2f0f41259e83ce0566d15a4f42;p=gnulib.git gnulib-tool.py: Remove duplicate per-module definitions. * pygnulib/constants.py: Remove duplicate __authors__, __license__, and __copyright__ definitions. * pygnulib/GLInfo.py: Use the value of __authors__ and __copyright__ from __init__.py for output. * pygnulib/*.py: Remove unused references to the constant.py definitions. --- diff --git a/ChangeLog b/ChangeLog index da5c3833a2..cbc2a83f75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-04-20 Collin Funk + + gnulib-tool.py: Remove duplicate per-module definitions. + * pygnulib/constants.py: Remove duplicate __authors__, __license__, and + __copyright__ definitions. + * pygnulib/GLInfo.py: Use the value of __authors__ and __copyright__ + from __init__.py for output. + * pygnulib/*.py: Remove unused references to the constant.py + definitions. + 2024-04-20 Bruno Haible gnulib-tool.py: Fix a bug in removed / added files handling. diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 9a4f4bfe68..19611b823c 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -27,14 +27,6 @@ from .GLError import GLError from pygnulib.enums import CopyAction -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index ff4e3027d6..91077a0325 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -30,14 +30,6 @@ from .GLModuleSystem import GLModuleTable from .GLMakefileTable import GLMakefileTable -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLError.py b/pygnulib/GLError.py index a990c382b1..47d1e97fdc 100644 --- a/pygnulib/GLError.py +++ b/pygnulib/GLError.py @@ -22,14 +22,6 @@ import os from . import constants -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLFileSystem.py b/pygnulib/GLFileSystem.py index 4bd8b1f386..1cad7f5bad 100644 --- a/pygnulib/GLFileSystem.py +++ b/pygnulib/GLFileSystem.py @@ -28,14 +28,6 @@ from .GLError import GLError from .GLConfig import GLConfig -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 59c7295cbc..0863ba530e 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -32,14 +32,6 @@ from .GLMakefileTable import GLMakefileTable from .GLEmiter import GLEmiter -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLInfo.py b/pygnulib/GLInfo.py index c7de90376a..37d8560af0 100644 --- a/pygnulib/GLInfo.py +++ b/pygnulib/GLInfo.py @@ -21,17 +21,10 @@ from __future__ import annotations import os import re import subprocess as sp +from pygnulib import __author__, __copyright__ from . import constants -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== @@ -125,7 +118,7 @@ class GLInfo: def copyright_range(self) -> str: '''Returns a formatted copyright string showing a year range.''' - return f'Copyright (C) {constants.__copyright__}' + return f'Copyright (C) {__copyright__}' def usage(self) -> str: '''Show help message.''' diff --git a/pygnulib/GLMakefileTable.py b/pygnulib/GLMakefileTable.py index 8df0822f00..a38276c665 100644 --- a/pygnulib/GLMakefileTable.py +++ b/pygnulib/GLMakefileTable.py @@ -23,14 +23,6 @@ from . import constants from .GLConfig import GLConfig -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 6d5e874375..301592a79d 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -30,14 +30,6 @@ from .GLConfig import GLConfig from .GLFileSystem import GLFileSystem -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 6f74453f29..8bbef2a311 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -35,14 +35,6 @@ from .GLMakefileTable import GLMakefileTable from .GLEmiter import GLEmiter -#=============================================================================== -# Define module information -#=============================================================================== -__author__ = constants.__author__ -__license__ = constants.__license__ -__copyright__ = constants.__copyright__ - - #=============================================================================== # Define global constants #=============================================================================== diff --git a/pygnulib/constants.py b/pygnulib/constants.py index 0b6a606a01..4890e2129f 100644 --- a/pygnulib/constants.py +++ b/pygnulib/constants.py @@ -34,16 +34,6 @@ import __main__ as interpreter # Define module information #=============================================================================== __all__ = [] -__author__ = \ - [ - 'Bruno Haible', - 'Paul Eggert', - 'Simon Josefsson', - 'Dmitry Selyutin', - 'Collin Funk', - ] -__license__ = 'GNU GPLv3+' -__copyright__ = '2002-2024 Free Software Foundation, Inc.' #===============================================================================