Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52.

2024-03-10 Thread Collin Funk
Hi Bruno, On 3/10/24 5:13 AM, Bruno Haible wrote: > automake_options = {x for y in configure_ac_automake_options for x in > y.split()} I've attached the fixed patch. The only change is turning this line to: automake_options = { x for y in

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-10 Thread Collin Funk
Hi Bruno, On 3/10/24 3:51 PM, Bruno Haible wrote: > I prefer comparing with '' explicitly. It's clearer about the intent. > It avoids an implicit conversion from str to bool. Sure, makes sense. I'll keep that in mind in the future. > Regarding the regex change: In a group '(...)' one needs to

Re: planning for beta-testing gnulib-tool.py

2024-03-10 Thread Collin Funk
Hi Simon and Bruno, On 3/10/24 7:00 PM, Bruno Haible wrote: > I think this would be a reasonable time after having made the Python > implementation > the default. I expect every package maintainer to run 'gnulib-tool' at least > once > in two years and report problems if they occur. Based on

Re: planning for beta-testing gnulib-tool.py

2024-03-10 Thread Bruno Haible
Hi Simon, > > - With approach (A), when we make a change to gnulib-tool, we need to > > commit > > new expected test results, which is quite easy. No effort otherwise. > > - With approach (B), we will get failures for other reasons as well: when > > a gnulib module has changed in an

Re: planning for beta-testing gnulib-tool.py

2024-03-10 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > I guess we are thinking about slightly different things: > > * (A) I am thinking about > - for P in { coreutils, gettext, ... }, taking a frozen(!) checkout of P, > removing irrelevant source files (esp. all *.h, *.c, documentation, > etc.), > - and a

Re: planning for beta-testing gnulib-tool.py

2024-03-10 Thread Bruno Haible
Hi Simon, > > 5) Possibly it makes also sense to allow GNULIB_TOOL_IMPL to be set to > >'sh+py'. In this case the script will make a full copy of the destination > >dir, run the shell implementation and the Python implementation on the > >two destination dirs, separately, and compare

Re: planning for beta-testing gnulib-tool.py

2024-03-10 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > 5) Possibly it makes also sense to allow GNULIB_TOOL_IMPL to be set to >'sh+py'. In this case the script will make a full copy of the destination >dir, run the shell implementation and the Python implementation on the >two destination dirs, separately, and

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-10 Thread Bruno Haible
Hi Collin, > Hopefully this patch should be better. Thanks, much better. I applied it, together with this follow-up: 2024-03-10 Bruno Haible gnulib-tool.py: Tweak last commit. * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Avoid an implicit str to bool conversion.

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-10 Thread Collin Funk
Hi Bruno, Hopefully this patch should be better. Feel free to let me know if there is anything I didn't address. On 3/10/24 5:07 AM, Bruno Haible wrote: > 1) This form of conditional expression > >base = self.config['destdir'] if self.config['destdir'] else '.' > >mentions first a

planning for beta-testing gnulib-tool.py

2024-03-10 Thread Bruno Haible
As the closing of gaps in the Python implementation of gnulib-tool progresses, and as Collin Funk reports today: these changes (aside from the issues you have mentioned) are enough to bootstrap Coreutils. it is time to think about how to manage the beta-testing of gnulib-tool.py and the

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Collin Funk
Hi Bruno, > Also, please don't drop comments that are present in the original code, such > as: > > # Replace NMD, so as to remove redundant "$(MKDIR_P) '.'" invocations. > # The logic is similar to how we define gl_source_base_prefix. Sure. I remember seeing that comment in the shell

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Bruno Haible
Hi Collin, Re 0003 (part 53): In the function _eliminate_NMD, the list accumulation expressions are a bit complex. Here, I feel, a better indentation is not even enough. Can you refactor this as follows: - A function _eliminate_NMD_from_line that takes a single line as argument and return a

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52.

2024-03-10 Thread Bruno Haible
Hi Collin, This one looks good, except please reformat the line automake_options = {x for y in configure_ac_automake_options for x in y.split()} as suggested for part 51. Bruno

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-10 Thread Bruno Haible
Hi Collin, > I've implemented the initial support for --automake-subdir in > gnulib-tool.py. It is a larger patch so let me know if you have any > questions. Thanks. Though, it would be nice to improve a couple of things: 1) This form of conditional expression base =

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Collin Funk
On 3/9/24 8:15 PM, Collin Funk wrote: > I don't remember those changes looking too hard, so _hopefully_ I can > get them done soon. The first two patches deal with the @NMD@ and @!NMD@ replacements. I used a mix of the test cases from my previous emails and the Emacs merge-gnulib script. All the