changeset 39688:5466b38e0354 python

pygnulib: fix "mention" section paths
author Dmitry Selyutin <ghostmansd@gmail.com>
date Sun, 08 Jul 2018 23:32:30 +0300
parents d7bdd3a55a79
children
files pygnulib.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pygnulib.py	Sun Jul 08 23:20:47 2018 +0300
+++ b/pygnulib.py	Sun Jul 08 23:32:30 2018 +0300
@@ -718,9 +718,8 @@
             fmt = "  - \"include {makefile_name}\" from within \"{tests_base}/Makefile.am\","
         print(fmt.format(**config), file=sys.stdout)
     for (directory, key, value) in mkedits:
-        if directory != ".":
-            directory += os.path.sep
-        print(f"  - mention \"{value}\" in {key} in {directory}Makefile.am,", file=sys.stdout)
+        path = os.path.normpath(os.path.join(directory, "Makefile.am"))
+        print(f"  - mention \"{value}\" in {key} in {path},", file=sys.stdout)
     position_early_after = "AC_PROG_CC"
     with vfs_iostream(project, config.ac_file, "rb", "UTF-8") as stream:
         contents = stream.read()