pygnulib/GLImport.py


Log

Author Commit Date CI Message
Simon Josefsson 32a72f45 2023-01-01T01:14:21 maint: run 'make update-copyright'
Bruno Haible 62fa8fc7 2022-08-10T00:51:59 gnulib-tool.py: Finish implementing option --conditional-dependencies. * gnulib-tool.py (main) Accept options --conditional-dependencies, --no-conditional-dependencies. * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use str(module), not module, as key. Fix logic bug. (GLModuleTable.getCondition): Simplify. (GLModuleTable.transitive_closure): Show a warning when there are duplicate dependencies. Fix logic bug. (GLModuleTable.transitive_closure_separately): Simplify. (GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple lib_SOURCES augmentation lines. Cope with comments at the end of a lib_SOURCES augmentation line. Add the dummy module at the end of the modules list. * pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces the dummy module to the end of the list. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to terminate the shell functions. Add code for the dependencies from the unconditional to the conditional modules. Don't emit AM_CONDITIONAL for unconditional modules.
Bruno Haible bc3d94bb 2022-08-09T23:59:40 gnulib-tool.py: Don't do license replacements in the autoconf snippets. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Remove fileassistant argument. Don't invoke the 'aux' transformer here. Don't produce Windows CR-LFs on Windows. (GLEmiter.autoconfSnippets): Remove fileassistant argument. * pygnulib/GLImport.py (GLImport.gnulib_comp): Update all callers. * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
Bruno Haible 98e7ca35 2022-08-09T16:11:09 gnulib-tool.py: Fix some code generation details. * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a lib_LDFLAGS line, remove also the newline. Fix regex that matches lib_SOMETHING. Add a newline after each '## begin gnulib module' line. Don't emit 'endif' lines without corresponding 'if'. When emitting a '+=' augmentation, make sure it does not get emitted a second time. Don't emit a blank line when there is no AM_CPPFLAGS augmentation. Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN, backslash-escape the double-quotes. Don't produce Windows CR-LFs on Windows. Simplify. (GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove also the newline. Fix regex that matches lib_SOMETHING. Don't remove a blank line before EXTRA_DIST. Add a newline after each '## begin gnulib module' line. Set uses_subdirs also when there is a .c file in a subdir of tests/. When emitting a '+=' augmentation, make sure it does not get emitted a second time. Don't produce Windows CR-LFs on Windows. Simplify. * pygnulib/GLImport.py (GLImport.execute): Update after getLink() changed.
Bruno Haible d528738a 2022-08-07T22:59:08 gnulib-tool.py: Rename a method. * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed from GLModule.getAutoconfSnippet_Early. * pygnulib/GLImport.py: Update. * pygnulib/GLTestDir.py: Likewise.
Bruno Haible 54bf87fe 2022-08-07T13:29:59 gnulib-tool.py: Make regex uses more straightforward. * pygnulib/GLModuleSystem.py: Don't use flag re.S on regular expressions that are meant to match a single line only, and remove the use of the "minimal matching" *? construct whose only purpose was to neutralize the re.S flag. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLTestDir.py: Likewise.
Bruno Haible a68f103c 2022-08-07T13:11:07 gnulib-tool.py: Make regex uses more straightforward. * pygnulib/GLEmiter.py: Don't use flag re.S on regular expressions on regular expressions with no '.'. * pygnulib/GLImport.py: Likewise.
Bruno Haible e6f143f0 2022-08-06T23:22:26 gnulib-tool: In the VC files messages, omit the destination directory. This makes these messages consistent with the other "Copying ..." and "Creating ..." messages. * gnulib-tool (func_import): Omit $destdir/ from the "Updating"/ "Creating" messages regarding .gitignore files. * pygnulib/GLImport.py (GLImport._update_ignorelist_): Likewise.
Bruno Haible 07d41642 2022-08-06T23:10:14 gnulib-tool.py: Fix output in --dry-run mode. * pygnulib/GLImport.py (GLImport._update_ignorelist_): In dry-run mode, say "Update", not "Updating".
Bruno Haible 9812027a 2022-08-06T23:01:36 gnulib-tool.py: Finish implementing options --vc-files, --no-vc-files. * gnulib-tool.py (main): Accept options --vc-files, --no-vc-files. * pygnulib/GLImport.py (GLImport.__init__): Correct parsing of gl_VC_FILES directive. (GLImport.gnulib_cache): Don't treat the value False like None. (GLImport.execute): Skip the .gitignore file manipulations if vc_files is False.
Bruno Haible b5850cf2 2022-08-06T03:06:51 gnulib-tool.py: Finish implementing option --po-domain. * gnulib-tool.py (main): Accept option --po-domain. * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable reference. * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in from the gnulib directory. Don't require a shell when invoking wget. After invoking wget, restore the current directory.
Bruno Haible ad534101 2022-08-05T23:15:39 gnulib-tool.py: Refactor --makefile-name option. * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'. * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'. * pygnulib/GLMakefileTable.py: Update. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
Bruno Haible 45b39787 2022-08-05T17:13:20 gnulib-tool.py: Fix 'Unused import' warnings. * gnulib-tool.py: Remove unused imports. * pygnulib/*.py: Likewise.
Bruno Haible 276725c4 2022-08-05T04:05:04 gnulib-tool.py: Simplify. * pygnulib/constants.py (compiler): Remove function. * gnulib-tool.py: Use re.compile directly instead. * pygnulib/*.py: Likewise.
Bruno Haible c0c72120 2022-08-04T22:24:20 gnulib-tool.py: Fix typo. * pygnulib/GLImport.py (GLImport.execute): Actually handle file removals.
Bruno Haible 362f779b 2022-08-04T21:53:51 gnulib-tool.py: Coding style: Revisit line breaks. * gnulib-tool.py: Avoid line breaks at arbitrary points inside expressions. Use line breaks to clarify [... for ...] iterations. * pygnulib/*.py: Likewise.
Bruno Haible 895f7af0 2022-08-04T19:10:27 gnulib-tool.py: Simplify boolean setters. * pygnulib/GLConfig.py (setLibtool): New method, replaces enableLibtool and disableLibtool. (setCondDeps): New method, replaces enableCondDeps and disableCondDeps. (setVCFiles): New method, replaces enableVCFiles and disableVCFiles. (setSymbolic): New method, replaces enableSymbolic and disableSymbolic. (setLSymbolic): New method, replaces enableLSymbolic and disableLSymbolic. (setLibtests): New method, replaces enableLibtests and disableLibtests. (setSingleConfigure): New method, replaces enableSingleConfigure and disableSingleConfigure. (setDryRun): New method, replaces enableDryRun and disableDryRun. (setErrors): New method, replaces enableErrors and disableErrors. (__init__): Update. * pygnulib/GLImport.py: Likewise. * pygnulib/GLTestDir.py: Likewise.
Bruno Haible 2a33db96 2022-08-04T18:26:08 gnulib-tool.py: Use mainstream/GNU coding style. * gnulib-tool.py: Break lines before the % operator, not after. * pygnulib/*.py: Likewise. Avoid line breaks when the resulting lines are not too long.
Bruno Haible 353460b9 2022-08-04T12:40:04 gnulib-tool.py: Implement option --avoid. * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Compute the effective avoids list here. (GLModuleTable.transitive_closure, GLModuleTable.add_dummy): Consider the avoids list. * pygnulib/GLImport.py (GLImport.gnulib_cache): Use the avoids list from GLConfig directly. (GLImport.prepare): No need any more to set the avoids list in the GLModuleTable.
Bruno Haible de028fc3 2022-08-03T22:29:52 gnulib-tool.py: Implement options --without-c++-tests etc. * gnulib-tool.py (main): Accept options --without-c++-tests, --without-longrunning-tests, --without-privileged-tests, --without-unportable-tests. Improve error message for --copy-file with invalid number of arguments. Check for invalid options given in --import, --add-import, --remove-import, --update modes. Pass both sets of test categories to the GLConfig constructor. * pygnulib/GLConfig.py (GLConfig.__init__): Accept incl_test_categories and excl_test_categories instead of testflags. (checkInclTestCategory): Renamed from checkTestFlag. (enableInclTestCategory): Renamed from enableTestFlag. (disableInclTestCategory): Renamed from disableTestFlag. (getInclTestCategories): Renamed from getTestFlags. (setInclTestCategories): Renamed from setTestFlags. (resetInclTestCategories): Renamed from resetTestFlags. (setInclTestCategory, checkExclTestCategory, enableExclTestCategory, disableExclTestCategory, getExclTestCategories, setExclTestCategories, resetExclTestCategories): New methods. * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Accept two booleans as second and third constructor arguments. (transitive_closure): Correct the determination of whether to include each module, depending on the with-* and without-* options. (transitive_closure_separately): Update. * pygnulib/GLMakefileTable.py: Update. * pygnulib/GLImport.py (__init__, actioncmd, gnulib_cache, execute): Update. * pygnulib/GLTestDir.py (GLTestDir.__init__, GLTestDir.execute, GLMegaTestDir.__init__): Update.
Bruno Haible e2d15e5c 2022-08-03T16:49:15 gnulib-tool.py: Follow gnulib-tool changes, part 23. Follow gnulib-tool changes 2016-11-11 Bruno Haible <bruno@clisp.org> gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license. 2016-12-02 Nikos Mavrogiannopoulos <nmav@gnutls.org> gnulib-tool (func_import): Adhere to the license guideline ... 2016-12-02 Daiki Ueno <ueno@gnu.org> gnulib-tool (func_import): Relax the regex ... * gnulib-tool.py: For --lgpl, accept value 3orGPLv2. * pygnulib/GLInfo.py (GLInfo.usage): Update. * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check. * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache): Update gl_LGPL handling. (GLImport.prepare): Update license compatibility checks and license header rewriting. * pygnulib/GLTestDir.py (GLTestDir.execute): Update license compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
Bruno Haible ed7b3d9b 2022-08-03T14:27:51 gnulib-tool.py: Avoid errors when writing to a VFAT file system, part 2. * pygnulib/constants.py (movefile): New function. * pygnulib/*.py: Use it instead of shutil.
Bruno Haible dbc9a4b3 2022-08-03T11:27:21 gnulib-tool.py: Avoid errors when writing to a VFAT file system. * pygnulib/constants.py (copyfile, copyfile2): New functions. * gnulib-tool.py: Use them instead of shutil. * pygnulib/*.py: Likewise.
Bruno Haible f88aeeb4 2022-08-03T00:24:29 gnulib-tool.py: Fix typo. * pygnulib/GLImport.py (GLImport.__init__): Use the relative auxdir as second, not as first argument of joinpath.
Bruno Haible 6bdf668e 2022-07-31T18:39:19 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.
Bruno Haible dd7b332f 2022-07-30T13:51:36 gnulib-tool.py: Clean up imports. * gnulib-tool.py: Remove unused constants. * pygnulib/*.py: Likewise.
Bruno Haible 0a624ee7 2022-07-30T13:29:26 gnulib-tool.py: Assume Python 3. * gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'. * pygnulib/*.py: Likewise.
Bruno Haible d2abfb90 2022-07-30T11:45:36 gnulib-tool.py: Assume Python 3. * gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string. * pygnulib/*.py: Likewise.
Bruno Haible 5d39cdb4 2022-07-30T10:44:02 gnulib-tool.py: Modernize coding style. * pygnulib/*.py: Remove parentheses around raise value expressions.
Bruno Haible 1b4313a1 2022-07-29T23:29:23 gnulib-tool.py: Follow gnulib-tool changes, part 17. Follow gnulib-tool change 2015-10-06 Pavel Raiskup <praiskup@redhat.com> gnulib-tool: fix tests of 'extensions' module * pygnulib/GLEmiter.py (GLEmiter.preEarlyMacros): New function. * pygnulib/GLImport.py (GLImport.gnulib_comp): Invoke it. * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
Bruno Haible 4bccc91c 2022-07-29T22:58:27 gnulib-tool.py: Follow gnulib-tool changes, part 16. Follow gnulib-tool change 2015-09-25 Pavel Raiskup <praiskup@redhat.com> gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the 'extensions' module is used).
Bruno Haible 0bc144f9 2022-07-29T18:45:33 gnulib-tool.py: Modernize coding style. * pygnulib/*.py: Remove parentheses around return value expressions.
Bruno Haible 3e44e3bb 2022-07-29T16:41:28 gnulib-tool.py: Modernize the file headers. * pygnulib/*.py: Remove '#!/usr/bin/python' (not needed) and 'encoding: UTF-8' lines (default in Python 3). Add copyright notice.
Bruno Haible f00ef30e 2022-07-29T16:35:28 gnulib-tool.py: Use mainstream coding style. * gnulib-tool.py: Clarify the coding style. Fix some pycodestyle warnings. * pygnulib/constants.py: Likewise. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLMakefileTable.py: Likewise.
Bruno Haible a8f2dda7 2021-06-04T20:42:44 gnupload, git-merge-changelog: Fix module description. * gnulib-tool (func_import, func_create_testdir): Treat 'GPLv2+ build tool' like 'GPLed build tool'. * pygnulib/GLImport.py (prepare): Likewise. * modules/gnupload (License): Change to 'GPLv2+ build tool'. * modules/git-merge-changelog (License): Change to GPLv2+.
Tim Rühsen c2dbe353 2019-11-30T13:04:28 gnulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am. Reported by Dagobert Michelsen <dam@opencsw.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00086.html>. * pygnulib/GLModuleSystem.py (getLink): Don't join the parts. Return a list of strings instead of one string. * pygnulib/GLEmiter.py (lib_Makefile_am): Adapt accordingly. * pygnulib/GLImport.py (execute): Likewise.
Benno Schulenberg 0ddd440d 2018-10-07T18:20:44 bootstrap, gnulib-tool: use https instead of insecure rsync The rsync command does not do any authentication and thus allows man-in-the-middle attacks. Better use wget over https, although this is slower. * build-aux/bootstrap (download_po_files, po_download_command_format): Don't try using rsync; always use wget over https to fetch PO files. * gnulib-tool (func_import): Likewise. * pygnulib/GLImport.py (GLImport.execute): Likewise.
Benno Schulenberg 7d73965d 2018-10-07T18:20:43 bootstrap, gnulib-tool: correct the translations wget command Using the -np (--no-parent) option doesn't prevent wget from traversing the given URL to a default depth of 5, and since the domain directory contains a href="/latest/" link, this means that wget searches through all domains anyway and will also download PO files that are meant for other packages. When getting the PO files for the nano domain, for example, you will end up with af.po and ast.po (and many others) too, but there are no African nor Asturian translations for nano. So, use the --level option instead, to stop wget from looking any further than the given URL. * build-aux/bootstrap (po_download_command_format2): Restrict recursion to a single level. * gnulib-tool (func_import): Likewise. * pygnulib/GLImport.py (GLImport.execute): Likewise.
Colin Watson 900ca5c0 2018-07-26T17:53:37 bootstrap, gnulib-tool: fix translations rsync Previously, we created files such as $pobase/Makefile.in.in and then the subsequent rsync would immediately delete them. * build-aux/bootstrap (po_download_command_format): Avoid deleting non-.po files in target directory when rsyncing translations. * gnulib-tool (func_import): Likewise. * pygnulib/GLImport.py (GLImport.execute): Likewise.
Darshit Shah 230c5fab 2017-11-20T22:11:48 append, don't replace existing VCS ignore files
Jim Meyering 2a3dbe99 2017-11-12T09:13:30 maint: shorten https://lists.gnu.org/archive/html/... links Each /archive/html/ part can be replace with /r/. Run this to induce the change: git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g' * ChangeLog: Perform that substitution. * Makefile: Likewise. * STATUS-libposix: Likewise. * build-aux/bootstrap: Likewise. * doc/maintain.texi: Likewise. * gnulib-tool: Likewise. * lib/allocator.h: Likewise. * lib/argp-ba.c: Likewise. * lib/argp-pv.c: Likewise. * lib/canon-host.c: Likewise. * lib/canonicalize-lgpl.c: Likewise. * lib/float.in.h: Likewise. * lib/fstat.c: Likewise. * lib/getdelim.c: Likewise. * lib/getprogname.c: Likewise. * lib/glthread/thread.h: Likewise. * lib/intprops.h: Likewise. * lib/mbsrtowcs-state.c: Likewise. * lib/safe-read.c: Likewise. * lib/signal.in.h: Likewise. * lib/stat.c: Likewise. * lib/stdbool.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdio.in.h: Likewise. * lib/sysexits.in.h: Likewise. * lib/timespec.h: Likewise. * lib/wcsrtombs-state.c: Likewise. * m4/alloca.m4: Likewise. * m4/extern-inline.m4: Likewise. * m4/fstatat.m4: Likewise. * m4/gnulib-common.m4: Likewise. * m4/lib-ignore.m4: Likewise. * m4/printf.m4: Likewise. * m4/regex.m4: Likewise. * m4/stat-size.m4: Likewise. * m4/std-gnu11.m4: Likewise. * m4/stdbool.m4: Likewise. * m4/sys_types_h.m4: Likewise. * m4/threadlib.m4: Likewise. * m4/vararrays.m4: Likewise. * pygnulib/GLImport.py: Likewise. * tests/test-exp.h: Likewise. * tests/test-exp2.h: Likewise. * tests/test-expm1.h: Likewise. * tests/test-fflush2.c: Likewise. * tests/test-getopt_long.h: Likewise. * tests/test-intprops.c: Likewise. * tests/test-log.h: Likewise. * tests/test-log10.h: Likewise. * tests/test-log1p.h: Likewise. * tests/test-log2.h: Likewise. * tests/test-printf-posix.h: Likewise. * tests/test-regex.c: Likewise. * tests/test-snprintf-posix.h: Likewise. * tests/test-sprintf-posix.h: Likewise. * tests/test-stdalign.c: Likewise. * tests/test-stdbool.c: Likewise. * tests/test-vasnprintf-posix.c: Likewise. * tests/test-vasprintf-posix.c: Likewise. * top/maint.mk: Likewise.
Bruno Haible 03eac9d3 2017-09-14T00:35:56 all: Replace many more http URLs by https URLs. Update stale URLs. * users.txt: Remove mention of 'newts'. * lib/localename.c: Update comment about LANG_SOTHO.
Bruno Haible 08369d22 2017-09-09T01:36:16 gnulib-tool.py: follow gnulib-tool changes, part 10 Follow gnulib-tool change 2014-09-05 Mathieu Anquetin <mathieu@anquetin.eu> gnulib-tool: Use same options as build-aux/bootstrap to download PO files.
Bruno Haible 48c442f3 2017-09-09T01:26:20 gnulib-tool.py: follow gnulib-tool changes, part 9 Follow gnulib-tool change 2014-09-05 Mathieu Anquetin <mathieu@anquetin.eu> Fallback to wget when rsync of PO files fails.
Bruno Haible 46301570 2017-09-09T01:16:46 gnulib-tool.py: follow gnulib-tool changes, part 8 Follow gnulib-tool change 2014-05-27 Sylvain Beucler <beuc@beuc.net>. gnulib-tool: wget translations using --no-verbose rather than --quiet
Bruno Haible 9f23e10d 2017-09-09T01:09:45 gnulib-tool.py: follow gnulib-tool changes, part 7 Follow gnulib-tool change 2014-05-27 Sylvain Beucler <beuc@beuc.net> gnulib-tool: adjust translation wget to avoid a https redirection
Bruno Haible f0e4c4b6 2017-09-09T00:32:50 gnulib-tool.py: follow gnulib-tool changes, part 3 Follow gnulib-tool change 2012-08-26 Bruno Haible <bruno@clisp.org> gnulib-tool: Remove no-op option --no-changelog. * pygnulib/constants.py: Remove FILES dictionary. * pygnulib/*: Update.
Bruno Haible fc4e57bb 2017-09-09T00:03:44 gnulib-tool.py: follow gnulib-tool changes, part 2 Follow gnulib-tool change 2012-08-13 Bruno Haible <bruno@clisp.org> gnulib-tool: Fix persistence of --witness-c-macro option.
Bruno Haible 0626a499 2017-09-09T01:21:26 gnulib-tool.py: Fix typo in rsync invocation.
Bruno Haible 574e518a 2017-09-09T01:31:54 gnulib-tool.py: Fix typo in wget invocation.
Dmitry Selyutin 21c52a82 2017-09-08T18:34:58 [pygnulib] autopep8 (fixing indentation, style, etc.)
Dmitry Selyutin 02a1f93e 2017-08-20T11:17:58 [pygnulib] initial merge (including some small bug fixes)