|
344f8683
|
2024-04-19T18:21:26
|
|
gnulib-tool.py: Simplify running some commands in a given directory.
* pygnulib/GLImport.py (GLImport.execute): Use sp.call with a cwd
argument, instead of calling chdir twice.
* pygnulib/GLModuleSystem.py (GLModuleSystem.list): Likewise.
* pygnulib/main.py (mode=='find'): Likewise.
|
|
229e2648
|
2024-04-18T11:03:00
|
|
gnulib-tool.py: Add a comment about coding style.
* pygnulib/main.py: Add a note about the common convention of using an
underscore prefix to mark a function/variable as private.
|
|
cb7e1bb2
|
2024-04-14T10:31:34
|
|
gnulib-tool.py: Write newlines consistently.
* pygnulib/constants.py (NL): Remove variable.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Use '\n' instead of
constants.NL.
* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Likewise.
* pygnulib/main.py (main_with_exception_handling): Likewise.
|
|
172b9afb
|
2024-04-13T13:30:44
|
|
gnulib-tool.py: Code tweak.
* pygnulib/main.py (main): Move file contents analysis out of a 'with'
statement.
|
|
3258dcae
|
2024-04-13T12:55:44
|
|
gnulib-tool.py: Stop using codecs.open.
* pygnulib/*.py: To open a file, consistently use
open(..., mode='[rwa]', newline='\n', encoding='utf-8').
|
|
d018f537
|
2024-04-13T12:06:34
|
|
gnulib-tool.py: Refactor directory tree removals.
* pygnulib/constants.py (rmtree): New function.
* pygnulib/GLImport.py (GLImport.execute): Use it instead of calling
'rm -rf' directly or shutil.rmtree.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.
* pygnulib/main.py (main): Likewise.
|
|
e25bb272
|
2024-04-12T18:34:49
|
|
gnulib-tool.py: Fix --copy-file directory creation.
Reported by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00140.html>
* pygnulib/main.py (main): Make sure that destdir is set in the GLConfig
object before copying files.
|
|
b3373a01
|
2024-04-12T19:10:33
|
|
gnulib-tool.py: Accept conditional dependencies with tests.
* pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination
of gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.
* pygnulib/GLError.py (GLError.__repr__): Remove error 10.
* pygnulib/main.py (main_with_exception_handling): Likewise.
|
|
40970e22
|
2024-04-12T18:11:46
|
|
gnulib-tool.py: Fix handling of --with-obsolete.
* pygnulib/constants.py (TESTS): Remove 'obsolete' category.
* pygnulib/GLConfig.py (GLConfig.__init__): Add optional incobsolete
parameter.
(GLConfig.default): Handle 'incobsolete'.
(GLConfig.checkIncObsolete, GLConfig.setIncObsolete,
GLConfig.resetIncObsolete): New methods.
* pygnulib/GLModuleSystem.py (GLModuleSystem.transitive_closure): For
incobsolete, use new GLConfig methods.
* pygnulib/GLImport.py (GLImport.__init__, GLImport.actioncmd,
GLImport.gnulib_cache): Likewise.
* pygnulib/main.py (main): Pass the incobsolete value to the GLConfig
constructor.
|
|
fa65bd7e
|
2024-04-12T15:26:45
|
|
gnulib-tool.py: Print warnings just like gnulib-tool.sh.
* pygnulib/main.py (main): When printing a warning, print just
"gnulib-tool" instead of the absolute file name.
|
|
3bb200bb
|
2024-04-11T11:27:34
|
|
gnulib-tool.py: Remove redundant backslashes from regexps.
* pygnulib/GLTestDir.py (GLTestDir.execute): Don't backslash ']' when it
is outside of a set.
* pygnulib/GLImport.py (GLImport.__init__): Don't use a backslash when
']' is at the start of a '[...]' set. Don't backslash special characters
in a '[...]' set since they have their meaning dropped.
* pygnulib/main.py (main): Likewise.
|
|
a74f8027
|
2024-04-10T05:56:34
|
|
gnulib-tool: Fix a typo.
* gnulib-tool.sh: Fix a typo in comment.
* pygnulib/main.py (main): Likewise.
|
|
f41781a9
|
2024-04-08T16:37:48
|
|
gnulib-tool.py: Use single-quotes for strings.
* pygnulib/*.py: Change double-quoted strings to use single-quotes
unless doing so would require adding backslashes.
|
|
965b5c72
|
2024-04-08T16:08:50
|
|
gnulib-tool.py: Prefer 'list.append(item)' over 'list += [item]'.
* pygnulib/*.py: Change occurrences '+= [item]' to use '.append(item)'
where item is a single element added to the list.
See discussion here:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00091.html>
|
|
685a8726
|
2024-04-06T04:41:03
|
|
gnulib-tool.py: Locate configure.ac correctly when --dir is given.
* pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Don't combine the
given file name argument with destdir.
* pygnulib/main.py (main): Use os.path.join() instead of joinpath() when
constructing the path to the configure.ac file. The latter normalizes
paths which causes the test suite to fail when printed in files.
|
|
a4b2df9d
|
2024-04-04T15:29:50
|
|
gnulib-tool.py: Ignore 'use-dict-literal' warnings.
* pygnulib/.pylintrc: Don't emit warning messages suggesting that
'dict()' be converted to '{}'. This literal can be mistaken for sets,
see discussion here:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00054.html>
* pygnulib/main.py: Document this convention in coding style section.
* pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Convert an
occurrence of '{}' to 'dict()'.
|
|
81f1dc64
|
2024-04-02T18:04:09
|
|
gnulib-tool.py: Don't ignore the argument to --doc-base.
* pygnulib/main.py (main): Check for the argument to --doc-base before
creating the GLConfig object.
|
|
52a5f9e3
|
2024-04-02T13:42:53
|
|
gnulib-tool: Remove unused variables.
* pygnulib/GLConfig.py: Remove unused variables.
* pygnulib/GLEmiter.py: Likewise.
* pygnulib/GLFileSystem.py: Likewise.
* pygnulib/GLImport.py: Likewise.
* pygnulib/GLInfo.py: Likewise.
* pygnulib/GLModuleSystem.py: Likewise.
* pygnulib/GLTestDir.py: Likewise.
* pygnulib/main.py: Likewise.
* gnulib-tool.sh (func_emit_tests_Makefile_am): Remove unused variable
perhapsLT.
|
|
dbeb5f1f
|
2024-04-01T21:50:51
|
|
gnulib-tool.py: Use a standard Python program directory structure.
* pygnulib/main.py (main_with_exception_handling): New function for
existing code.
* .gnulib-tool.py: New file.
* pygnulib/constants.py: Update the computation of APP['root'].
* gnulib-tool.py: Don't set PYTHONPATH.
|
|
bf2f5662
|
2024-04-01T21:28:23
|
|
gnulib-tool.py: Simplify imports.
* pygnulib/enums.py: New file, extracted from pygnulib/GLFileSystem.py.
* pygnulib/classes.py: Remove file.
* pygnulib/GLFileSystem.py: Remove class CopyAction. Update imports.
* pygnulib/GLTestDir.py: Update imports.
* pygnulib/GLConfig.py: Update imports and remove 'classes.' prefix.
* pygnulib/main.py: Likewise.
|
|
289ab934
|
2024-04-01T01:40:01
|
|
gnulib-tool.py: Only check existence for --extract-tests-module.
* pygnulib/main.py (main): Check that the test module exists instead of
looking it up and patching it if diff's are found.
|
|
148b623a
|
2024-03-27T00:56:29
|
|
gnulib-tool.py: Add type hints to all functions.
* pygnulib/*.py: Add type hints and remove duplicate function signatures
from docstrings.
|
|
98b9e9ab
|
2024-03-26T15:43:21
|
|
gnulib-tool.py: Allow the use of both configure.ac and configure.in.
* pygnulib/GLImport.py (GLImport.__init__): Remove redundant checks for
configure.ac and configure.in.
* pygnulib/main.py (main): Check for configure.ac and configure.in
before reading it. Pass it to GLImport using the GLConfig object.
|
|
50a20932
|
2024-03-25T00:07:49
|
|
gnulib-tool.py: Use Python raw strings for regular expressions.
* pygnulib/*.py: Use raw string syntax for regular expression pattern
strings and repl strings.
|
|
99a74afb
|
2024-03-24T22:46:44
|
|
gnulib-tool.py: Bring the output into the right order.
* pygnulib/constants.py (force_output): New function.
(execute): Flush stdout after printing the "executing ..." line.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Invoke force_output.
* pygnulib/main.py (test, megatest): Likewise.
|
|
e8af5902
|
2024-03-20T17:51:55
|
|
gnulib-tool.py: Make --extract-filelist match gnulib-tool.sh.
* pygnulib/GLModuleSystem.py (GLModule.getFiles_Raw): New function which
returns the 'Files:' section from a module unchanged.
(GLModule.getFiles): Use it.
* pygnulib/main.py (main): Use it and match the output of gnulib-tool.sh
for --extract-filelist.
|
|
1daf1384
|
2024-03-19T12:09:57
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 68.
Follow gnulib-tool change
2022-07-31 Akim Demaille <akim@lrde.epita.fr>
gnulib-tool: add support for --automake-subdir-tests
* pygnulib/main.py (main): Add support for --automake-subdir-tests.
* pygnulib/GLInfo.py (GLInfo.usage): Add --automake-subdir-tests to the
help message.
* pygnulib/GLConfig.py (GLConfig.__init__): Add 'automake_subdir_tests'
to the parameter list. Initialize it.
(GLConfig.default): Default --automake-subdir-tests to False.
(GLConfig.resetAutomakeSubdir): Fix misleading docstring.
(GLConfig.getAutomakeSubdirTests, GLConfig.setAutomakeSubdirTests)
(GLConfig.resetAutomakeSubdirTests): New functions to manipulate and
access whether --automake-subdir-tests is in use.
* pygnulib/GLEmiter.py (GLEmiter.shellvars_init)
(GLEmiter.initmacro_end): Use sourcebase when handling tests and
--automake-subdir-tests is given.
* pygnulib/GLError.py (GLError.__repr__): Update error message to
include --automake-subdir-tests.
* pygnulib/GLImport.py (GLImport.__init__): Check for the
'subdir-objects' Automake option when --automake-subdir-tests is in use.
(GLImport.actioncmd): Add --automake-subdir-tests to the actioncmd
printed in generated files.
|
|
948b591d
|
2024-03-20T00:27:27
|
|
gnulib-tool: Make it work in the test suite.
* gnulib-tool.sh (gnulib_dir): Make absolute.
(func_create_megatestdir): If .git/refs/heads/master does not exist, use
ChangeLog instead.
* pygnulib/main.py (main): Make gnulib_dir absolute.
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): If
.git/refs/heads/master does not exist, use ChangeLog instead.
|
|
5572bd3f
|
2024-03-18T12:23:46
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 65.
Follow gnulib-tool change
2021-12-19 Bruno Haible <bruno@clisp.org>
gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
* pygnulib/GLImport.py (GLImport.execute): Don't add extra '-I' before
m4 directory in ACLOCAL_AMFLAGS. Prefer '0' instead of 'int()'. Mention
the use of AC_CONFIG_MACRO_DIRS in configure.ac as an alternative to
augmenting ACLOCAL_AMFLAGS.
* pygnulib/main.py (main): To find the m4 directories, look also for
AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS invocations in
configure.ac. Remove unnecessary call to 'joinpath' since it accepts a
variable length of arguments.
|
|
2d1da7b3
|
2024-03-18T00:43:53
|
|
gnulib-tool.py: Handle empty lists of lines consistently.
* pygnulib/constants.py (lines_to_multiline): New function.
(nlremove): Remove unused function.
* pygnulib/GLEmiter.py (_eliminate_NMD): Use lines_to_multiline instead
of the '\n'.join idiom.
(GLEmiter.autoconfSnippet, GLEmiter.autoconfSnippets,
GLEmiter.lib_Makefile_am): Likewise.
* pygnulib/GLImport.py (GLImport._update_ignorelist_, GLImport.execute):
Likewise.
* pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively,
GLModule.getLinkDirectiveRecursively, GLModuleTable.remove_if_blocks):
Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
* pygnulib/main.py (main): Likewise.
|
|
d64fd23b
|
2024-03-17T10:03:54
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 62.
Follow gnulib-tool change
2020-02-22 Bruno Haible <bruno@clisp.org>
gnulib-tool: Ensure copied files are writable.
* pygnulib/constants.py (ensure_writable): New function. Make sure files
are writable.
(symlink_relative, hardlink): Use it.
* pygnulib/GLFileSystem.py (GLFileSystem.lookup)
(GLFileAssistant.add_or_update): Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
* pygnulib/main.py (main): Likewise.
|
|
ac3f2516
|
2024-03-17T13:46:04
|
|
gnulib-tool: Add undocumented option --gnulib-dir.
* gnulib-tool.sh: Accept --gnulib-dir=... option.
* pygnulib/constants.py (init_DIRS): New function.
* pygnulib/main.py (main): Accept --gnulib-dir=... option. Invoke
init_DIRS. Expect .git directory to be present in DIRS['root'], not
APP['root'].
* pygnulib/GLImport.py (GLImport.execute): Use DIRS['root'], not
APP['root'].
|
|
894307b3
|
2024-03-16T11:47:05
|
|
gnulib-tool.py: Fix 'git update-index' call when using hard links.
* pygnulib/main.py: Fix conditional used to check whether 'git
update-index' should be called. Only catch FileNotFoundError exceptions
thrown when no 'git' program exists.
|
|
cb626876
|
2024-03-15T19:58:27
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 58.
Follow gnulib-tool change
2017-05-21 Bruno Haible <bruno@clisp.org>
gnulib-tool: Add options to create hard links.
* pygnulib/GLConfig.py (GLConfig.__init__): Add 'copymode' and
'lcopymode' to the parameter list. Initialize them.
(GLConfig.default): Don't use symbolic or hard links by default.
(GLConfig.checkCopyMode, GLConfig.setCopyMode, GLConfig.resetCopyMode):
New functions to modify and check the method for copying non --local-dir
files.
(GLConfig.checkLCopyMode, GLConfig.setLCopyMode)
(GLConfig.resetLCopyMode): New functions to modify and check the method
for copying --local-dir files.
(GLConfig.checkSymbolic, GLConfig.resetSymbolic, GLConfig.setSymbolic)
(GLConfig.checkLSymbolic, GLConfig.resetLSymbolic)
(GLConfig.setLSymbolic): Remove unused functions. The functionality of
these are now implemented in the *CopyMode() and *LCopyMode() variants.
* pygnulib/GLFileSystem.py (CopyAction.Hardlink): New Enum value to
describe hard links.
(GLFileSystem.shouldLink): Check if hard links should be used.
(GLFileAssistant.add, GLFileAssistant.update): Try to hard link if
enabled. Copy the file if linking fails.
(GLFileAssistant.add_or_update): Remove temporary files unconditionally.
* pygnulib/GLInfo.py (GLInfo.usage): Document new options in the usage
message.
* pygnulib/GLTestDir.py (GLTestDir.execute): Try to hard link if
enabled. Copy the file if linking fails.
* pygnulib/classes.py: Importy the CopyAction Enum.
* pygnulib/constants.py (hardlink): New function based on
symlink_relative.
* pygnulib/main.py (main): Add new options --hardlink and
--local-hardlink. Invoke 'git update-index --refresh' to mitigate the
effects of the hard links on git.
|
|
d776a13e
|
2024-03-14T18:41:05
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 57.
Follow gnulib-tool change
2019-01-04 Bruno Haible <bruno@clisp.org>
gnulib-tool: New option --extract-recursive-link-directive.
* pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively): New
function. Implements the --extract-recursive-dependencies option.
(GLModule.getLinkDirectiveRecursively): New function. Implements the
--extract-recursive-link-directive.
* pygnulib/main.py (main): Add the --extract-recursive-dependencies and
--extract-recursive-link-directive options.
* pygnulib/GLInfo.py (GLInfo.usage): Add new options to help message.
|
|
da5444f1
|
2024-03-13T19:21:44
|
|
gnulib-tool.py: Fix write failure due to bad sourcebase.
* pygnulib/constants.py (cleaner): Only call strip() on string objects.
* pygnulib/main.py (main): Fix parsing of AMLOCAL_AMFLAGS from
Makefile.am. Add some comments from gnulib-tool.
|
|
270c20cb
|
2024-03-10T14:07:35
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 51.
Follow gnulib-tool change
2021-12-15 Bruno Haible <bruno@clisp.org>
Accommodate non-recursive Automake in a less hacky way.
* pygnulib/GLConfig.py (GLConfig.__init__): Add 'automake_subdir' to the
parameter list.
(GLConfig.default): Set the default value of automake_subdir to a
boolean False.
(GLConfig.getAutomakeSubdir, GLConfig.setAutomakeSubdir)
(GLConfig.resetAutomakeSubdir): New functions to access and manipulate
the automake_subdir option.
* pygnulib/GLEmiter.py (GLEmiter.shellvars_init): New function.
(GLEmiter.initmacro_end): Add second parameter 'gentests'. Use it to prefix each
object file name in *_LIBOBJS and *_LTLIBOBJS.
* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add new
error for if --automake-subdir is used without the 'subdir-objects'
Automake option.
* pygnulib/GLImport.py (GLImport.__init__): Check for 'subdir-objects'
in Makefile.am.
(GLImport.actioncmd): Emit --automake-subdir in actioncmd.
(GLImport.gnulib_cache): Add gl_AUTOMAKE_SUBDIR to gnulib-cache.m4 if
--automake-subdir is used.
(GLImport.gnulib_comp): Update calls to GLEmiter.initmacro_end. Call
GLEmiter.shellvars_init.
(GLImport.execute): Likewise. Use the build-aux/prefix-gnulib-mk script.
* pygnulib/GLInfo.py (GLInfo.usage): Add --automake-subdir to the usage
message.
* pygnulib/GLTestDir.py (GLTestDir.execute): Update calls to
GLEmiter.initmacro_end. Call GLEmiter.shellvars_init.
* pygnulib/main.py (main): Add support for --automake-subdir.
|
|
41c6a894
|
2024-03-10T13:06:00
|
|
gnulib-tool.py: One more comment regarding coding style.
* pygnulib/main.py: Add comment regarding conditional expressions.
|
|
49c7d53c
|
2024-03-08T20:59:16
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 48.
Follow gnulib-tool change
2019-01-23 Bruno Haible <bruno@clisp.org>
gnulib-tool: Support running testdirs on Android.
* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add errno 20
to print an error if patching build-aux/test-driver fails.
* pygnulib/main.py (main): Likewise.
* pygnulib/GLTestDir.py (_patch_test_driver): New private function which
runs patch on build-aux/test-driver with build-aux/test-driver.diff.
(GLTestDir.execute, GLMegaTestDir.execute): Check for
build-aux/test-driver in each testdir and patch it after running
automake.
|
|
6038b3fa
|
2024-03-06T21:49:21
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 45.
Follow gnulib-tool changes
2021-12-12 Bruno Haible <bruno@clisp.org>
gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
2022-01-08 Bruno Haible <bruno@clisp.org>
gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
* pygnulib/GLConfig.py (GLConfig.__init__): Add 'tests_makefile_name'
argument.
(GLConfig.getMakefileName, GLConfig.setMakefileName)
(GLConfig.resetMakefileName): Remove references to tests Makefile.am in
doc strings.
(GLConfig.getTestsMakefileNamem, GLConfig.setTestsMakefileName)
(GLConfig.resetTestsMakefileName): New methods used to access value
passed with the '--tests-makefile-name' option.
* pygnulib/GLImport.py (GLImport.__init__): Check for
'gl_TESTS_MAKEFILE_NAME' in cache.
(GLImport.actioncmd): Output --tests-makefile-name when describing
gnulib-tool invocation.
(GLImport.gnulib_cache): Output 'gl_TESTS_MAKEFILE_NAME' to cache.
(GLImport.execute): Use two local variables, source_makefile_am and
tests_makefile_am, which are passed to gnulib-tool.py or given default
values.
* pygnulib/GLInfo.py (GLInfo.usage): Add '--tests-makefile-name' to
usage message.
* pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Reduce code
duplication by expecting Makefile names passed as arguments.
* pygnulib/main.py (main): Add support for '--tests-makefile-name'.
|
|
1348f1fd
|
2024-03-01T13:22:27
|
|
gnulib-tool.py: Clarify minimum supported Python version.
* pygnulib/main.py: Add comment regarding the Python version.
|
|
7d60a47a
|
2024-02-28T22:15:04
|
|
gnulib-tool.py: Follow gnulib-tool changes, part 35.
Follow gnulib-tool change
2023-05-28 Bruno Haible <bruno@clisp.org>
warnings, manywarnings: Assume autoconf >= 2.64.
* pygnulib/GLConfig.py (GLConfig.default, GLConfig.getAutoconfVersion)
(GLConfig.setAutoconfVersion, resetAutoconfVersion): Set required
Autoconf version to 2.64.
* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Likewise.
* pygnulib/GLImport.py (GLImport.__init__): Likewise.
* pygnulib/constants.py (DEFAULT_AUTOCONF_MINVERSION): Likewise.
* pygnulib/main.py: Likewise.
|
|
708356d4
|
2024-02-27T03:30:50
|
|
gnulib-tool.py: Add more comments.
* pygnulib/main.py: Add comments regarding code style. Mention the
pycodestyle and pylint configurations.
|
|
a8ebdedf
|
2024-02-26T16:13:46
|
|
gnulib-tool.py: Fix undefined variable access.
* pygnulib/main.py (main): Don't use gnu_make before it is defined.
|
|
cc4e1775
|
2024-02-26T23:44:01
|
|
gnulib-tool.py: Reorganize code.
* pygnulib/main.py: New file, moved here from gnulib-tool.py.
* pygnulib/constants.py: Change the way APP['name'] and DIRS['root'] are
computed.
* gnulib-tool.py: New file, based on gnulib-tool.
|