From: Collin Funk <collin.funk1@gmail.com>
To: Bruno Haible <bruno@clisp.org>, bug-gnulib@gnu.org
Subject: Re: Can we have gnulib-tool.py emit the same copyright header?
Date: Wed, 28 Feb 2024 13:48:01 -0800 [thread overview]
Message-ID: <37f843ac-f23b-4536-9e62-5b3e6bb818c5@gmail.com> (raw)
In-Reply-To: <5644800.1xdlsreqCQ@nimes>
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
On 2/28/24 1:30 PM, Bruno Haible wrote:
> Looks good, except for a typo or spelling mistake. [1]
I'm not the greatest at spelling apparently. Attached it with the typo fixed.
Collin
[-- Attachment #2: 0001-gnulib-tool.py-Emit-year-range-on-file-copyright-not.patch --]
[-- Type: text/x-patch, Size: 2167 bytes --]
From c21617ca4561f48225543378d0d4e24ac700877b Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Wed, 28 Feb 2024 13:12:05 -0800
Subject: [PATCH] gnulib-tool.py: Emit year range on file copyright notices.
* pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
copyright string with a year range.
* pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
for file copyright headers.
---
ChangeLog | 8 ++++++++
pygnulib/GLEmiter.py | 2 +-
pygnulib/GLInfo.py | 4 ++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 8cfe498940..02d22de00f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-28 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Emit year range on file copyright notices.
+ * pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
+ copyright string with a year range.
+ * pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
+ for file copyright headers.
+
2024-02-28 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Make module sorting more similar to gnulib-tool.
diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py
index d8cc085f59..260478e5da 100644
--- a/pygnulib/GLEmiter.py
+++ b/pygnulib/GLEmiter.py
@@ -73,7 +73,7 @@ class GLEmiter(object):
'''GLEmiter.copyright_notice() -> str
Emit a header for a generated file.'''
- emit = "# %s" % self.info.copyright()
+ emit = '# %s' % self.info.copyright_range()
emit += """
#
# This file is free software; you can redistribute it and/or modify
diff --git a/pygnulib/GLInfo.py b/pygnulib/GLInfo.py
index a0a70270a9..08edb9b383 100644
--- a/pygnulib/GLInfo.py
+++ b/pygnulib/GLInfo.py
@@ -125,6 +125,10 @@ class GLInfo(object):
result = re.compile(' .*').sub('', first_changelog_line)
return result
+ def copyright_range(self):
+ '''Returns a formatted copyright string showing a year range.'''
+ return f'Copyright (C) {constants.__copyright__}'
+
def usage(self):
'''Show help message.'''
result = '''\
--
2.39.2
next prev parent reply other threads:[~2024-02-28 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 1:41 Can we have gnulib-tool.py emit the same copyright header? Collin Funk
2024-02-28 2:07 ` Bruno Haible
2024-02-28 2:19 ` Collin Funk
2024-02-28 2:26 ` Bruno Haible
2024-02-28 2:51 ` Collin Funk
2024-02-28 7:53 ` Collin Funk
2024-02-28 11:00 ` Bruno Haible
2024-02-28 21:18 ` Collin Funk
2024-02-28 21:30 ` Bruno Haible
2024-02-28 21:48 ` Collin Funk [this message]
2024-02-28 23:34 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37f843ac-f23b-4536-9e62-5b3e6bb818c5@gmail.com \
--to=collin.funk1@gmail.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).