]> Savannah Git Hosting - gnulib.git/commitdiff
module: alternate naming for some properties
authorDmitry Selyutin <ghostmansd@gmail.com>
Sat, 9 Sep 2017 17:22:10 +0000 (20:22 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 9 Sep 2017 17:22:10 +0000 (20:22 +0300)
pygnulib/generator.py
pygnulib/module.py

index e8c6a231018013168a65f8c0e3f1b9a6b9d72877..b99cd1fbf7b04f7ca6075373cc125bbd917cdf31 100644 (file)
@@ -222,7 +222,7 @@ class AutoconfSnippet(Generator):
     def __iter__(self):
         module = self.__module
         if module.name not in ("gnumakefile", "maintainer-makefile") or self.toplevel:
-            snippet = module.configure_ac_snippet
+            snippet = module.autoconf_snippet
             include_guard_prefix = self.__config.include_guard_prefix
             snippet.replace(r"${gl_include_guard_prefix}", include_guard_prefix)
             if not self.libtool:
index 75aad88a96fd16292a063b3d99cade3e93217ad5..88d4fc3995b32b009360ce8ae8b1f28e842e5ef6 100644 (file)
@@ -14,20 +14,20 @@ import re
 class Module:
     """gnulib generic module"""
     _TABLE_ = {
-        "description"                : (0x00, str, "Description"),
-        "comment"                    : (0x01, str, "Comment"),
-        "status"                     : (0x02, str, "Status"),
-        "notice"                     : (0x03, str, "Notice"),
-        "applicability"              : (0x04, str, "Applicability"),
-        "files"                      : (0x05, list, "Files"),
-        "dependencies"               : (0x06, list, "Depends-on"),
-        "early_configure_ac_snippet" : (0x07, str, "configure.ac-early"),
-        "configure_ac_snippet"       : (0x08, str, "configure.ac"),
-        "makefile_am_snippet"        : (0x09, str, "Makefile.am"),
-        "include"                    : (0x0A, list, "Include"),
-        "link"                       : (0x0B, list, "Link"),
-        "license"                    : (0x0C, str, "License"),
-        "maintainers"                : (0x0D, list, "Maintainer"),
+        "description"            : (0x00, str, "Description"),
+        "comment"                : (0x01, str, "Comment"),
+        "status"                 : (0x02, str, "Status"),
+        "notice"                 : (0x03, str, "Notice"),
+        "applicability"          : (0x04, str, "Applicability"),
+        "files"                  : (0x05, list, "Files"),
+        "dependencies"           : (0x06, list, "Depends-on"),
+        "early_autoconf_snippet" : (0x07, str, "configure.ac-early"),
+        "autoconf_snippet"       : (0x08, str, "configure.ac"),
+        "automake_snippet"       : (0x09, str, "Makefile.am"),
+        "include"                : (0x0A, list, "Include"),
+        "link"                   : (0x0B, list, "Link"),
+        "license"                : (0x0C, str, "License"),
+        "maintainers"            : (0x0D, list, "Maintainer"),
     }
     _PATTERN_DEPENDENCIES_ = re.compile("^(\\S+)(?:\\s+(.+))*$")
     _PATTERN_INCLUDE_ = re.compile("^[\\<\"]([A-Za-z0-9/\\-_]+\\.h)[\\>\"](?:\\s+.*^)*$")
@@ -163,39 +163,39 @@ class Module:
 
 
     @property
-    def early_configure_ac_snippet(self):
+    def early_autoconf_snippet(self):
         """early configure.ac snippet"""
-        return self._table_["early_configure_ac_snippet"]
+        return self._table_["early_autoconf_snippet"]
 
-    @early_configure_ac_snippet.setter
-    def early_configure_ac_snippet(self, value):
+    @early_autoconf_snippet.setter
+    def early_autoconf_snippet(self, value):
         if not isinstance(value, str):
             raise TypeError("'str' type is expected")
-        self._table_["early_configure_ac_snippet"] = value
+        self._table_["early_autoconf_snippet"] = value
 
 
     @property
-    def configure_ac_snippet(self):
+    def autoconf_snippet(self):
         """configure.ac snippet"""
-        return self._table_["configure_ac_snippet"]
+        return self._table_["autoconf_snippet"]
 
-    @configure_ac_snippet.setter
-    def configure_ac_snippet(self, value):
+    @autoconf_snippet.setter
+    def autoconf_snippet(self, value):
         if not isinstance(value, str):
             raise TypeError("'str' type is expected")
-        self._table_["configure_ac_snippet"] = value
+        self._table_["autoconf_snippet"] = value
 
 
     @property
-    def makefile_am_snippet(self):
+    def automake_snippet(self):
         """Makefile.am snippet"""
-        return self._table_["makefile_am_snippet"]
+        return self._table_["automake_snippet"]
 
-    @makefile_am_snippet.setter
-    def makefile_am_snippet(self, value):
+    @automake_snippet.setter
+    def automake_snippet(self, value):
         if not isinstance(value, str):
             raise TypeError("'str' type is expected")
-        self._table_["makefile_am_snippet"] = value
+        self._table_["automake_snippet"] = value
 
 
     @property
@@ -354,9 +354,9 @@ class FileModule(Module):
         "Applicability"      : (str, "applicability"),
         "Files"              : (list, "files"),
         "Depends-on"         : (list, "dependencies"),
-        "configure.ac-early" : (str, "early_configure_ac_snippet"),
-        "configure.ac"       : (str, "configure_ac_snippet"),
-        "Makefile.am"        : (str, "makefile_am_snippet"),
+        "configure.ac-early" : (str, "early_autoconf_snippet"),
+        "configure.ac"       : (str, "autoconf_snippet"),
+        "Makefile.am"        : (str, "automake_snippet"),
         "Include"            : (list, "include"),
         "Link"               : (list, "link"),
         "License"            : (str, "license"),