diff options
author | Bruno Haible <bruno@clisp.org> | 2022-07-31 18:39:19 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-07-31 23:52:27 +0200 |
commit | 6bdf668e5748a511082efed773b2b127e93fcb1d (patch) | |
tree | 4096874c27798c4bb6a647899436b1aa0304a3b0 /gnulib-tool.py | |
parent | 18dcc627ddeced96bc192e169bf19e1a38c53374 (diff) | |
download | gnulib-6bdf668e5748a511082efed773b2b127e93fcb1d.tar.gz |
gnulib-tool.py: Follow gnulib-tool changes, part 19.
Follow gnulib-tool changes
2015-12-09 Pavel Raiskup <praiskup@redhat.com>
gnulib-tool: allow multiple --local-dir usage
2019-02-14 Bruno Haible <bruno@clisp.org>
gnulib-tool: Improve handling of multiple --local-dir options.
* gnulib-tool (func_reconstruct_cached_dir): When the argument is
absolute, return it unmodified.
(func_compute_relative_local_gnulib_path): Renamed from
func_count_relative_local_gnulib_path. Add comment.
* gnulib-tool.py: Accept multiple --local-dir options and collect the
values into localpath.
* pygnulib/GLConfig.py: Take a localpath argument instead of a localdir
argument.
(getLocalDir, setLocalDir, resetLocalDir): Remove methods.
(getLocalPath, setLocalPath, resetLocalPath): New methods.
* pygnulib/GLFileSystem.py (CopyAction): New class.
(GLFileSystem.lookup): Consider all dirs in localpath.
(GLFileSystem.shouldLink): New method.
(GLFileAssistant): Use shouldLink.
* pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all
dirs in localpath.
(GLModuleSystem.list): Likewise.
* pygnulib/GLEmiter.py: Update.
* pygnulib/GLImport.py (GLImport.__init__): Put the argument of
gl_LOCAL_DIR into localpath, not localdir.
(GLImport.actioncmd): Consider all dirs in localpath.
(GLImport.relative_to_destdir, GLImport.relative_to_currdir): New
methods.
(GLImport.gnulib_cache): Combine all dirs in localpath. Use
self.relative_to_destdir.
* pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-x | gnulib-tool.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py index 523de7769e..0b2f866920 100755 --- a/gnulib-tool.py +++ b/gnulib-tool.py @@ -24,7 +24,7 @@ # - Line length is not limited to 79 characters. # - Line breaking before or after binary operators? Better before, like in GNU. # You can use this command to check the style: -# $ pycodestyle --max-line-length=128 --ignore=E265,W503,E241,E711,E712 gnulib-tool.py pygnulib/*.py +# $ pycodestyle --max-line-length=128 --ignore=E265,W503,E241,E711,E712,E201,E202 gnulib-tool.py pygnulib/*.py #=============================================================================== @@ -66,7 +66,7 @@ def main(): # Reset arguments mode = None destdir = None - localdir = None + localpath = None modcache = None verbose = None auxdir = None @@ -224,11 +224,12 @@ def main(): dest='destdir', default=None, nargs=1) - # localdir + # localpath parser.add_argument('-ld', '--local-dir', - dest='localdir', + action='append', + dest='localpath', default=None, - nargs=1) + nargs='?') # verbose parser.add_argument('-v', '--verbose', default=0, @@ -458,9 +459,7 @@ def main(): destdir = cmdargs.destdir if destdir != None: destdir = cmdargs.destdir[0] - localdir = cmdargs.localdir - if localdir != None: - localdir = cmdargs.localdir[0] + localpath = cmdargs.localpath libname = cmdargs.libname if libname != None: libname = cmdargs.libname[0] @@ -514,7 +513,7 @@ def main(): # Create pygnulib configuration. config = classes.GLConfig( destdir=destdir, - localdir=localdir, + localpath=localpath, m4base=m4base, auxdir=auxdir, modules=modules, |