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 /pygnulib/GLTestDir.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 'pygnulib/GLTestDir.py')
-rw-r--r-- | pygnulib/GLTestDir.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 79f67a8fdc..7a7f5c52fb 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -30,6 +30,7 @@ from .GLConfig import GLConfig from .GLModuleSystem import GLModule from .GLModuleSystem import GLModuleTable from .GLModuleSystem import GLModuleSystem +from .GLFileSystem import CopyAction from .GLFileSystem import GLFileSystem from .GLFileSystem import GLFileAssistant from .GLMakefileTable import GLMakefileTable @@ -143,7 +144,6 @@ class GLTestDir(object): '''GLTestDir.execute() Create a scratch package with the given modules.''' - localdir = self.config['localdir'] auxdir = self.config['auxdir'] testflags = list(self.config['testflags']) sourcebase = self.config['sourcebase'] @@ -154,8 +154,6 @@ class GLTestDir(object): libname = self.config['libname'] libtool = self.config['libtool'] witness_c_macro = self.config['witness_c_macro'] - symbolic = self.config['symbolic'] - lsymbolic = self.config['lsymbolic'] single_configure = self.config['single_configure'] include_guard_prefix = self.config['include_guard_prefix'] macro_prefix = self.config['macro_prefix'] @@ -337,7 +335,7 @@ class GLTestDir(object): if flag: shutil.copy(lookedup, destpath) else: # if not flag - if symbolic or (lsymbolic and lookedup == joinpath(localdir, src)): + if self.filesystem.shouldLink(src, lookedup) == CopyAction.Symlink: constants.link_relative(lookedup, destpath) else: shutil.copy(lookedup, destpath) |