Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Tim Rühsen
On Samstag, 9. September 2017 09:51:01 CEST Eric Blake wrote:
> On 09/09/2017 09:38 AM, Bruno Haible wrote:
> > Hello Tim,
> > 
> >> So if you remove it from bootstrap, I'll update bootstrap in our project
> >> main dir and that's it.
> > 
> > No, we don't remove it from 'bootstrap'. This piece of
> > backward-compatibility code is not expensive to keep.
> > 
> >> @Bruno Maybe it would be wise to just have a symlink to gnulib/build-aux/
> >> bootstrap ?
> > 
> > I don't understand what you mean. Symlinks inside git repositories are a
> > problem for those people who perform a checkout on Windows.
> 
> Another problem is that bootstrap MUST be a shell script rather than a
> symlink, since one of the purposes of running ./bootstrap is to DO the
> git submodule checkout.

Lol, yes that's pretty obvious - shame on me (guess I was too tired ;-)
My question was at least so stupid that Bruno couldn't understand it.

Regards, Tim

signature.asc
Description: This is a digitally signed message part.


Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Dmitry Selyutin
> Well, the logic that binary files (*.mo, *.class) should be copied as-is,
> not transformed, should be kept, no? You'll replace the implementation
> of the transform?
The binary files shall not be touched, but text files shall not be processed
with sed. That's what I mean; the patch is OK, but the code around is
flawed.

> If you replace 'sed' here, you save a subprocess
> invocation, though.
Exactly; I think one of the strongest motivations to perform the whole
rewrite
in Python is the fact that the original gnulib-tool spawns processes too
often.
Moreover, process invocation is quite a dumb technique when you have
built-in
language features instead.

2017-09-09 18:41 GMT+03:00 Bruno Haible :

> Hi Dmitry,
>
> > > [PATCH 6/6] gnulib-tool.py: follow gnulib-tool changes, part 14
> > > gnulib-tool: don't transform binary files with sed
> > All these sed transformers shall be IMHO entirely deprecated. I don't
> quite
> > remember why I used sed
>
> Using 'sed' is acceptable here because the input comes from a file and the
> output goes to a file anyway. If you replace 'sed' here, you save a
> subprocess
> invocation, though. This will be interesting when you/we are going to start
> optimizing the thing.
>
> Another possible optimization here is that first, we do a
>   cp lookedup tmpfile
> and then
>   sed -e transformer < lookedup > tmpfile
> We could eliminate the cp command when there is a transformer.
>
> > be aware though that this part of code is going to be removed.
>
> Well, the logic that binary files (*.mo, *.class) should be copied as-is,
> not transformed, should be kept, no? You'll replace the implementation
> of the transform?
>
> > > [PATCH 5/6] gnulib-tool.py: follow gnulib-tool changes, part 13
> > > gnulib-tool: concatenate lib_SOURCES to a single line
> > A bit tricky one, but OK from my side. The only thing I noted is that
> > `startpos,pos = match.span()` can be a bit better formatted into
> > `(startpos, pos) = match.span()`.
>
> Done. I had verified that both syntaxes work, but did not know which one is
> the preferred one.
>
> Bruno
>
>


-- 
With best regards,
Dmitry Selyutin


Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Bruno Haible
Hi Dmitry,

> > [PATCH 6/6] gnulib-tool.py: follow gnulib-tool changes, part 14
> > gnulib-tool: don't transform binary files with sed
> All these sed transformers shall be IMHO entirely deprecated. I don't quite
> remember why I used sed

Using 'sed' is acceptable here because the input comes from a file and the
output goes to a file anyway. If you replace 'sed' here, you save a subprocess
invocation, though. This will be interesting when you/we are going to start
optimizing the thing.

Another possible optimization here is that first, we do a
  cp lookedup tmpfile
and then
  sed -e transformer < lookedup > tmpfile
We could eliminate the cp command when there is a transformer.

> be aware though that this part of code is going to be removed.

Well, the logic that binary files (*.mo, *.class) should be copied as-is,
not transformed, should be kept, no? You'll replace the implementation
of the transform?

> > [PATCH 5/6] gnulib-tool.py: follow gnulib-tool changes, part 13
> > gnulib-tool: concatenate lib_SOURCES to a single line
> A bit tricky one, but OK from my side. The only thing I noted is that
> `startpos,pos = match.span()` can be a bit better formatted into
> `(startpos, pos) = match.span()`.

Done. I had verified that both syntaxes work, but did not know which one is
the preferred one.

Bruno




Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Dmitry Selyutin
Hi Bruno,


thanks for these patches. I've left some comments below.


> [PATCH 6/6] gnulib-tool.py: follow gnulib-tool changes, part 14
> gnulib-tool: don't transform binary files with sed
All these sed transformers shall be IMHO entirely deprecated. I don't quite
remember why I used sed; may be I could not find a way to express the same
idea
using Python "re" module.
Anyway, feel free to push it, because right now it will make the behavior
more
stable; be aware though that this part of code is going to be removed.


> [PATCH 5/6] gnulib-tool.py: follow gnulib-tool changes, part 13
> gnulib-tool: concatenate lib_SOURCES to a single line
A bit tricky one, but OK from my side. The only thing I noted is that
`startpos,pos = match.span()` can be a bit better formatted into
`(startpos, pos) = match.span()`.



Everything is OK though, feel free to push.

2017-09-09 17:52 GMT+03:00 Bruno Haible :

> Hi Dmitry,
>
> Here's the next round of patches, for your review. I'm slowly working
> through
> the past gnulib-tool changes.
>
> Bruno
>
>


-- 
With best regards,
Dmitry Selyutin


Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Bruno Haible
Hi Dmitry,

Here's the next round of patches, for your review. I'm slowly working through
the past gnulib-tool changes.

Bruno

>From 5aa8b0d419518889a8d6f392c2d38fdd438ce39f Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 12:01:28 +0200
Subject: [PATCH 1/6] gnulib-tool.py: Fix subend function.

Make subend('a','b','Laura') return 'Laurb' instead of 'bL'.
---
 pygnulib/constants.py | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index 9e0f194..9428e1f 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -397,6 +397,10 @@ def filter_filelist(separator, filelist,
 
 
 def substart(orig, repl, data):
+'''Replaces the start portion of a string.
+
+Returns data with orig replaced by repl, but only at the beginning of data.
+Like data.replace(orig,repl), except only at the beginning of data.'''
 result = data
 if data.startswith(orig):
 result = repl + data[len(orig):]
@@ -404,9 +408,13 @@ def substart(orig, repl, data):
 
 
 def subend(orig, repl, data):
+'''Replaces the end portion of a string.
+
+Returns data with orig replaced by repl, but only at the end of data.
+Like data.replace(orig,repl), except only at the end of data.'''
 result = data
 if data.endswith(orig):
-result = repl + data[:len(repl)]
+result = data[:-len(orig)] + repl
 return(result)
 
 
-- 
2.7.4

>From d568af9587276169ae1f4f3ce253cbc25cb8fc9a Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 12:27:40 +0200
Subject: [PATCH 2/6] gnulib-tool.py: Remove unused function nlcount.

---
 pygnulib/constants.py | 16 
 1 file changed, 16 deletions(-)

diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index 9428e1f..61d86a2 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -437,20 +437,4 @@ def nlremove(text):
 return(text)
 
 
-def nlcount(text):
-'''Return count of newlines before and after text.'''
-counter = int()
-before = int()
-after = int()
-text = text.replace('\r\n', '\n')
-while text[counter] == '\n':
-before += 1
-counter += 1
-counter = len(text) - 1
-while text[counter] == '\n':
-after += 1
-counter -= 1
-print(before, after)
-
-
 __all__ += ['APP', 'DIRS', 'MODES', 'UTILS']
-- 
2.7.4

>From 0f23f389f4102a183c0cf7a3599f0f1318e7aaed Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 12:48:58 +0200
Subject: [PATCH 3/6] gnulib-tool.py: Define and use two new global functions.

* pygnulib/constants.py (remove_backslash_newline, combine_lines): New
functions.
---
 pygnulib/GLModuleSystem.py |  4 ++--
 pygnulib/GLTestDir.py  |  4 ++--
 pygnulib/constants.py  | 13 +
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index 6dab6dd..59109cc 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -707,7 +707,7 @@ Include:|Link:|License:|Maintainer:)'
 else:  # if not tests module
 # TODO: unconditional automake snippet for nontests modules
 snippet = self.getAutomakeSnippet_Conditional()
-snippet = snippet.replace('\\\n', ' ')
+snippet = constants.combine_lines(snippet)
 pattern = compiler(
 '^lib_SOURCES[\t ]*\\+=[\t ]*(.*?)$', re.S | re.M)
 mentioned_files = pattern.findall(snippet)
@@ -1149,7 +1149,7 @@ class GLModuleTable(object):
 if type(module) is not GLModule:
 raise(TypeError('each module must be a GLModule instance'))
 snippet = module.getAutomakeSnippet()
-snippet = snippet.replace('\\\n', '')
+snippet = constants.remove_backslash_newline(snippet)
 pattern = compiler(
 '^lib_SOURCES[\t ]*\\+=[\t ]*(.*?)$', re.S | re.M)
 files = pattern.findall(snippet)
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index 6140750..fded6d7 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -727,6 +727,7 @@ class GLTestDir(object):
 path = joinpath(self.testdir, sourcebase, 'Makefile.am')
 with codecs.open(path, 'rb', 'UTF-8') as file:
 snippet = file.read()
+snippet = constants.remove_backslash_newline(snippet)
 cleaned_files = list()
 tests_cleaned_files = list()
 built_sources = list()
@@ -736,7 +737,6 @@ class GLTestDir(object):
 
 # Extract the value of "CLEANFILES += ..." and "MOSTLYCLEANFILES += ...".
 regex_find = list()
-snippet = snippet.replace('\\\n', '')
 pattern = compiler('^CLEANFILES[\t ]*\\+=(.*?)$', re.S | re.M)
 regex_find += pattern.findall(snippet)
 pattern = compiler('^MOSTLYCLEANFILES[\t 

Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Eric Blake
On 09/09/2017 09:38 AM, Bruno Haible wrote:
> Hello Tim,
> 
>> So if you remove it from bootstrap, I'll update bootstrap in our project 
>> main 
>> dir and that's it.
> 
> No, we don't remove it from 'bootstrap'. This piece of backward-compatibility
> code is not expensive to keep.
> 
>> @Bruno Maybe it would be wise to just have a symlink to gnulib/build-aux/
>> bootstrap ?
> 
> I don't understand what you mean. Symlinks inside git repositories are a
> problem for those people who perform a checkout on Windows.

Another problem is that bootstrap MUST be a shell script rather than a
symlink, since one of the purposes of running ./bootstrap is to DO the
git submodule checkout.  If it is checked into git as a symlink to a
submodule, then users have to run something other than ./bootstrap to
get the submodule updated, which defeats the purpose of bootstrap being
able to do that itself.  Yes, that makes bootstrap special as one of the
few files that must be copied directly into projects using it, rather
than left as a symlink into a submodule.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Bruno Haible
Hello Tim,

> So if you remove it from bootstrap, I'll update bootstrap in our project main 
> dir and that's it.

No, we don't remove it from 'bootstrap'. This piece of backward-compatibility
code is not expensive to keep.

> @Bruno Maybe it would be wise to just have a symlink to gnulib/build-aux/
> bootstrap ?

I don't understand what you mean. Symlinks inside git repositories are a
problem for those people who perform a checkout on Windows.

Bruno




Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Bruno Haible
Hi Dmitry,

Thanks for the reviews.

> Because right now it is a no-op, but parser still doesn't bark when it
> founds it.
> The current behavior of gnulib-tool.py matches the same of gnulib-tool.
> Once you will apply the change, parser shall complain on unknown
> --no-changelog,

Good point. I missed this.

Pushed with this parser change withdrawn,

> As for the rest, feel free to push the changes.
> I'll do the same in the "python" branch.

Yes, presumably you will have do adapt these changes from the 'master' to
the 'python' branch. I'm only doing the translation from past gnulib-tool
history to gnulib-tool.py in 'master'.

Bruno




Re: gnulib-tool.py: trivial fixes

2017-09-09 Thread Bruno Haible
Dmitry Selyutin wrote:
> Sure, perfectly OK.

OK, I've pushed these.




Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Tim Rühsen
On Samstag, 9. September 2017 13:08:09 CEST Dmitry Selyutin wrote:
> Hi Bruno,
> 
> I have only one question regarding --no-changelog option.
> Are you sure you want to entirely deprecate it?
> Because right now it is a no-op, but parser still doesn't bark when it
> founds it.
> The current behavior of gnulib-tool.py matches the same of gnulib-tool.
> Once you will apply the change, parser shall complain on unknown
> --no-changelog,
> And this change will for sure break some setups (e.g.wget2 still uses it).
> CC'ing Tim.

We don't use it explicitly. We use the 'bootstrap' script from gnulib which 
includes --no-changelog:

###
# Import from gnulib.

gnulib_tool_options="\
 --import\
 --no-changelog\
 --aux-dir $build_aux\
 --doc-base $doc_base\
 --lib $gnulib_name\
 --m4-base $m4_base/\
 --source-base $source_base/\
 --tests-base $tests_base\
 --local-dir $local_gl_dir\
 $gnulib_tool_option_extras\
"
###

So if you remove it from bootstrap, I'll update bootstrap in our project main 
dir and that's it.

@Bruno Maybe it would be wise to just have a symlink to gnulib/build-aux/
bootstrap ?

Regards, Tim


signature.asc
Description: This is a digitally signed message part.


Re: gnulib-tool.py argument parsing

2017-09-09 Thread Dmitry Selyutin
Hi Bruno,

to be honest, the command-line parsing in the gnulib-tool.py certainly
sucks.
I'm creating a new command-line parser from the scratch, and it works like
charm.
For example, it is much easier to avoid the error you described.
I'll take a look on how to fix the current parser and try to come up with
patch.
I guess there will be a lot of such errors until we switch to a new parser
though.

P.S. Frankly some of this errors are caused by the original solution.
I mean that some of the options (e.g. "modes", like --list, --import, etc.)
are not really options.
It was quite difficult to teach arparse to understand which options can be
combined and which not.

2017-09-09 0:44 GMT+03:00 Bruno Haible :

> Hi Dmitry,
>
> I'm banging my head against this:
>
>   $ ./gnulib-tool.py --test dirent
>   
>
>   $ ./gnulib-tool.py --test --destdir=../testdir-dirent dirent
>   usage: gnulib-tool.py --help
>   ./gnulib-tool.py: error: unrecognized arguments: dirent
>
> The argument parsing conventions for POSIX/GNU programs distinguish
>   * option with 0 or 1 arguments,
>   * non-option arguments.
> In strict POSIX and in gnulib-tool, the non-option arguments come last,
> that is, the user is not allowed to write
>
> $ ./gnulib-tool.py dirent --test --destdir=../testdir-dirent
> or
> $ ./gnulib-tool.py --test dirent --destdir=../testdir-dirent
>
> I'm fine with argument reordering, that is, to *allow* different ways
> of specifying the arguments. But gnulib-tool.py is currently *forcing*
> a specific argument order which is
>   1. invalid for gnulib-tool
>   2. not according to strict POSIX.
> Namely, it *forces* the syntax
> $ ./gnulib-tool.py --test dirent --destdir=../testdir-dirent
> or
> $ ./gnulib-tool.py --destdir=../testdir-dirent --test dirent
>
>
> This "unrecognized arguments" error is explained in
> https://stackoverflow.com/questions/12818146/
>
> So, I think the fix will be to
>
> 1) replace the line
> cmdargs = parser.parse_args()
> with
> cmdargs, nonoption_args = parser.parse_known_args()
>
> 2) Revisit all uses of nargs='+' and nargs='*'.
>
> Bruno
>
>


-- 
With best regards,
Dmitry Selyutin


Re: gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Dmitry Selyutin
Hi Bruno,

I have only one question regarding --no-changelog option.
Are you sure you want to entirely deprecate it?
Because right now it is a no-op, but parser still doesn't bark when it
founds it.
The current behavior of gnulib-tool.py matches the same of gnulib-tool.
Once you will apply the change, parser shall complain on unknown
--no-changelog,
And this change will for sure break some setups (e.g.wget2 still uses it).
CC'ing Tim.

As for the rest, feel free to push the changes.
I'll do the same in the "python" branch.

2017-09-09 12:44 GMT+03:00 Bruno Haible :

> Hi Dmitry,
>
> I've started to copy all modifications done to gnulib-tool since 2012
> over to gnulib-tool.py. Here is the first round of such updates.
> OK to push?
>
> Most of these are not really tested, and I'm a beginner regarding Python.
> Therefore it's very possible that you find mistakes in these patches.
>
> Bruno
>



-- 
With best regards,
Dmitry Selyutin


Re: gnulib-tool.py: trivial fixes

2017-09-09 Thread Dmitry Selyutin
Sure, perfectly OK.

2017-09-09 12:40 GMT+03:00 Bruno Haible :

> Hi Dmitry,
>
> Here are some proposed fixes for trivial issues. May I push these?
>
> Bruno
>
>


-- 
With best regards,
Dmitry Selyutin


gnulib-tool.py: follow gnulib-tool changes

2017-09-09 Thread Bruno Haible
Hi Dmitry,

I've started to copy all modifications done to gnulib-tool since 2012
over to gnulib-tool.py. Here is the first round of such updates.
OK to push?

Most of these are not really tested, and I'm a beginner regarding Python.
Therefore it's very possible that you find mistakes in these patches.

Bruno
>From e40de420ae64e970376bcfe25105e3ba1f0efbbc Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Fri, 8 Sep 2017 23:59:29 +0200
Subject: [PATCH 05/16] gnulib-tool.py: follow gnulib-tool changes, part 1

* pygnulib/GLInfo.py: Follow gnulib-tool change from 2012-06-21
"gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests."
---
 pygnulib/GLInfo.py | 27 +++
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/pygnulib/GLInfo.py b/pygnulib/GLInfo.py
index 71f19ca..c0bae0e 100644
--- a/pygnulib/GLInfo.py
+++ b/pygnulib/GLInfo.py
@@ -154,15 +154,11 @@ Operation modes:
   --update  update the current package, restore files omitted
 from version control
   --create-testdir  create a scratch package with the given modules
-(pass --with-tests to include the unit tests)
   --create-megatestdir  create a mega scratch package with the given modules
 one by one and all together
-(pass --with-tests to include the unit tests)
   --testtest the combination of the given modules
-(pass --with-tests to include the unit tests)
 (recommended to use CC=\"gcc -Wall\" here)
   --megatesttest the given modules one by one and all together
-(pass --with-tests to include the unit tests)
 (recommended to use CC=\"gcc -Wall\" here)
   --extract-descriptionextract the description
   --extract-commentextract the comment
@@ -200,21 +196,35 @@ Options for --import, --add/remove-import, --update:
 
   --dry-run Only print what would have been done.
 
+Options for --import, --add/remove-import:
+
+  --with-tests  Include unit tests for the included modules.
+
+Options for --create-[mega]testdir, --[mega]test:
+
+  --without-tests   Don't include unit tests for the included modules.
+
 Options for --import, --add/remove-import,
 --create-[mega]testdir, --[mega]test:
 
-  --with-tests  Include unit tests for the included modules.
   --with-obsolete   Include obsolete modules when they occur among the
 dependencies. By default, dependencies to obsolete
 modules are ignored.
   --with-c++-tests  Include even unit tests for C++ interoperability.
+  --without-c++-tests   Exclude unit tests for C++ interoperability.
   --with-longrunning-tests
 Include even unit tests that are long-runners.
+  --without-longrunning-tests
+Exclude unit tests that are long-runners.
   --with-privileged-tests
 Include even unit tests that require root
 privileges.
+  --without-privileged-tests
+Exclude unit tests that require root privileges.
   --with-unportable-tests
 Include even unit tests that fail on some platforms.
+  --without-unportable-tests
+Exclude unit tests that fail on some platforms.
   --with-all-tests  Include all kinds of problematic unit tests.
   --avoid=MODULEAvoid including the given MODULE. Useful if you
 have code that provides equivalent functionality.
@@ -264,13 +274,6 @@ Options for --import, --add/remove-import:
 
 Options for --create-[mega]testdir, --[mega]test:
 
-  --without-c++-tests   Exclude unit tests for C++ interoperability.
-  --without-longrunning-tests
-Exclude unit tests that are long-runners.
-  --without-privileged-tests
-Exclude unit tests that require root privileges.
-  --without-unportable-tests
-Exclude unit tests that fail on some platforms.
   --single-configureGenerate a single configure file, not a separate
 configure file for the tests directory.
 
-- 
2.7.4

>From 1342b9b4d8b8d0ba3174bae289e701a03443fe24 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 00:03:44 +0200
Subject: [PATCH 06/16] gnulib-tool.py: follow gnulib-tool changes, part 2

* pygnulib/GLImport.py: Follow gnulib-tool change from 2012-08-13
"gnulib-tool: Fix persistence of --witness-c-macro option."
---
 pygnulib/GLImport.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 

gnulib-tool.py: trivial fixes

2017-09-09 Thread Bruno Haible
Hi Dmitry,

Here are some proposed fixes for trivial issues. May I push these?

Bruno

>From d33ea821528592e87bb85de6059710ccf869 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 00:38:56 +0200
Subject: [PATCH 02/16] gnulib-tool.py: Bump copyright years up to 2017.

---
 gnulib-tool.py| 2 +-
 pygnulib/__init__.py  | 2 +-
 pygnulib/constants.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnulib-tool.py b/gnulib-tool.py
index 0a37182..806f4d7 100755
--- a/gnulib-tool.py
+++ b/gnulib-tool.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/pygnulib/__init__.py b/pygnulib/__init__.py
index fc205c2..129061b 100644
--- a/pygnulib/__init__.py
+++ b/pygnulib/__init__.py
@@ -15,6 +15,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 Free Software Foundation, Inc.'
+__copyright__ = '2012-2017 Free Software Foundation, Inc.'
 __author__ = 'Dmitriy Selyutin'
 __license__ = 'GNU GPLv3+'
diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index 3255635..ec2ca62 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -27,7 +27,7 @@ __author__ = \
 'Dmitriy Selyutin',
 ]
 __license__ = 'GNU GPLv3+'
-__copyright__ = '2012 Free Software Foundation, Inc.'
+__copyright__ = '2002-2017 Free Software Foundation, Inc.'
 
 
 #===
-- 
2.7.4

>From bd659d3e9ea5c2b17f758e834f7dde4376c7f402 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 01:31:54 +0200
Subject: [PATCH 03/16] gnulib-tool.py: Fix typo in wget invocation.

---
 pygnulib/GLImport.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 0e85a9a..22e3030 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -1212,7 +1212,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
 if result:  # use rsync
 args = ['rsync', '-Lrtz', '%sgulib/' % TP_RSYNC_URI, '.']
 else:  # use wget
-args = ['wget', '--quiet', '-r', '-l1', '-nd', '-np', 'A.po',
+args = ['wget', '--quiet', '-r', '-l1', '-nd', '-np', '-A.po',
 '%sgnulib' % TP_URL]
 sp.call(args, shell=True)
 else:  # if self.config['dryrun']
-- 
2.7.4

>From 2295a7c0a851ea1c8c1bf0f08f016e76c2550c4e Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 9 Sep 2017 01:21:26 +0200
Subject: [PATCH 04/16] gnulib-tool.py: Fix typo in rsync invocation.

---
 pygnulib/GLImport.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 22e3030..2236e8f 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -1210,7 +1210,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
 result = sp.check_output(cmd, shell=True)
 result = bool(int(result))
 if result:  # use rsync
-args = ['rsync', '-Lrtz', '%sgulib/' % TP_RSYNC_URI, '.']
+args = ['rsync', '-Lrtz', '%sgnulib/' % TP_RSYNC_URI, '.']
 else:  # use wget
 args = ['wget', '--quiet', '-r', '-l1', '-nd', '-np', '-A.po',
 '%sgnulib' % TP_URL]
-- 
2.7.4