bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool.py: Update authors list


From: Collin Funk
Subject: Re: gnulib-tool.py: Update authors list
Date: Sat, 20 Apr 2024 00:46:55 -0700
User-agent: Mozilla Thunderbird

On 4/19/24 10:07 AM, Bruno Haible wrote:
> Yeah, it seems redundant. You will surely find out whether doing so
> triggers some warnings from pylint, PyCharm, or other tools...

What do you think of the attached patch?

I tried to find out more about these variables but they are only
mentioned briefly in PEP 8 [1]. It looks like they are old variables
predating all of the fancy Python packaging stuff [2].

I've just removed the copies from constants.py and unused definitions
in the rest of the *.py files. In GLInfo we use __author__ and
__copyright__ for '--version' and copyright headers on generated
Makefiles, m4 files, etc. For that we can use:

    from pygnulib import __author__, __copyright__

to get them from __init__.py.

I would just leave the rest of the definitions in __init__.py too. If
in the distant future there is ever a need to package gnulib-tool.py
so you can do something like:

    $ pip install pygnulib
    $ python3 -m pygnulib --create-testdir

that information is pretty much copy-pasted into the configuration
files. I don't see much use for them beyond that though.

[1] https://peps.python.org/pep-0008/#module-level-dunder-names
[2] https://stackoverflow.com/a/9531279/23476799

Collin

Attachment: 0001-gnulib-tool.py-Remove-duplicate-per-module-definitio.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]