From: Collin Funk <collin.funk1@gmail.com>
To: bug-gnulib@gnu.org
Subject: [PATCH] gnulib-tool.py: Fix function call on incorrect object.
Date: Sun, 18 Feb 2024 17:24:46 -0800 [thread overview]
Message-ID: <678e8e4f-4609-4a61-8c56-231c1e7f7d97@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
I was looking around the gnulib code and decided to try out the Python
gnulib-tool. It looks like it hasn't been touched in a while so I
wanted to see what state it was in. Coreutils fails because
--automake-subdir is not supported (already documented in
gnulib-tool.py.TODO). GNU m4 gave the following error:
bootstrap: running: gnulib/gnulib-tool.py --no-changelog --no-libtool --symlink --update
Traceback (most recent call last):
File "/home/collin/.local/src/m4/gnulib/gnulib-tool.py", line 1171, in <module>
main()
File "/home/collin/.local/src/m4/gnulib/gnulib-tool.py", line 886, in main
importer = classes.GLImport(config, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/collin/.local/src/m4/gnulib/pygnulib/GLImport.py", line 243, in __init__
if self.checkInclTestCategory(TESTS['tests']) and self.config['conddeps']:
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GLImport' object has no attribute 'checkInclTestCategory'
I assume this was just caused by a small coding typo (if that is a
thing). This patch should fix it. The M4 build still fails because of
the !@NMD@ which is documented in TODO along with a few other errors
with the generated Makefile.
What is the status of the Python gnulib tool? I'm not sure how far
behind it is compared to the shell script but it seems like it would
be much faster. I would say more maintainable but I might just be bad
at writing shell scripts. :)
Collin
[-- Attachment #2: 0001-gnulib-tool.py-Fix-function-call-on-incorrect-object.patch --]
[-- Type: text/x-patch, Size: 2766 bytes --]
From 49adb8c6c480d42a2ad90f52fde10df9929506fb Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Sun, 18 Feb 2024 16:52:45 -0800
Subject: [PATCH] gnulib-tool.py: Fix function call on incorrect object.
* pygnulib/GLImport.py: Call checkInclTestCategory on the
GLConfig member instead of the GLImport object itself.
* pygnulib/__init__.py: Update copyright dates.
* pygnulib/constants.py: Update copyright dates.
---
ChangeLog | 8 ++++++++
pygnulib/GLImport.py | 2 +-
pygnulib/__init__.py | 2 +-
pygnulib/constants.py | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3a8559bfb3..b8d484e8da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-18 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Fix function call on incorrect object.
+ * pygnulib/GLImport.py: Call checkInclTestCategory on the
+ GLConfig member instead of the GLImport object itself.
+ * pygnulib/__init__.py: Update copyright dates.
+ * pygnulib/constants.py: Update copyright dates.
+
2024-02-18 Bruno Haible <bruno@clisp.org>
maint.mk: Add more comments.
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index b09ba9868c..68b2e7b0bb 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -240,7 +240,7 @@ class GLImport(object):
modules = self.cache.getModules()
# If user tries to apply conddeps and TESTS['tests'] together.
- if self.checkInclTestCategory(TESTS['tests']) and self.config['conddeps']:
+ if self.config.checkInclTestCategory(TESTS['tests']) and self.config['conddeps']:
raise GLError(10, None)
# Update configuration dictionary.
diff --git a/pygnulib/__init__.py b/pygnulib/__init__.py
index 37cd33ef90..b9050a98ac 100644
--- a/pygnulib/__init__.py
+++ b/pygnulib/__init__.py
@@ -30,6 +30,6 @@ coding standards, the GNU maintainer information, the GPL and other licenses (in
Texinfo), assorted configuration scripts, and more. The goal is to provide all
the common infrastructure needed by GNU packages.'''
-__copyright__ = '2012-2022 Free Software Foundation, Inc.'
+__copyright__ = '2012-2024 Free Software Foundation, Inc.'
__author__ = 'Dmitry Selyutin'
__license__ = 'GNU GPLv3+'
diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index a7e3d99ceb..a5554956c1 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -42,7 +42,7 @@ __author__ = \
'Dmitry Selyutin',
]
__license__ = 'GNU GPLv3+'
-__copyright__ = '2002-2022 Free Software Foundation, Inc.'
+__copyright__ = '2002-2024 Free Software Foundation, Inc.'
#===============================================================================
--
2.39.2
next reply other threads:[~2024-02-19 1:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 1:24 Collin Funk [this message]
2024-02-19 2:17 ` [PATCH] gnulib-tool.py: Fix function call on incorrect object Bruno Haible
2024-02-19 8:59 ` Simon Josefsson via Gnulib discussion list
2024-02-19 10:38 ` gnulib-tool caching Bruno Haible
2024-02-19 12:55 ` Simon Josefsson via Gnulib discussion list
2024-02-19 21:50 ` Bruno Haible
2024-02-19 22:24 ` Sam James
2024-02-19 23:11 ` Bruno Haible
2024-02-19 23:17 ` Sam James
2024-02-19 18:37 ` [PATCH] gnulib-tool.py: Fix function call on incorrect object Collin Funk
2024-02-19 21:36 ` Bruno Haible
2024-02-19 22:42 ` Collin Funk
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=678e8e4f-4609-4a61-8c56-231c1e7f7d97@gmail.com \
--to=collin.funk1@gmail.com \
--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).