changeset 19335:3008147e771a

config: autoconf -> ac_version
author Dmitry Selyutin <ghostmansd@gmail.com>
date Fri, 29 Sep 2017 22:46:16 +0300
parents a2857837ec76
children 935f6bf2bb1c
files pygnulib/config.py
diffstat 1 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/pygnulib/config.py	Fri Sep 29 22:44:12 2017 +0300
+++ b/pygnulib/config.py	Fri Sep 29 22:46:16 2017 +0300
@@ -76,7 +76,7 @@
         "libtool"           : False,
         "conddeps"          : False,
         "vc_files"          : False,
-        "autoconf"          : 2.59,
+        "ac_version"        : 2.59,
         "modules"           : set(),
         "avoid"             : set(),
         "files"             : set(),
@@ -398,18 +398,18 @@
 
 
     @property
-    def autoconf(self):
-        """autoconf version"""
-        return self.__table["autoconf"]
+    def ac_version(self):
+        """minimal supported autoconf version"""
+        return self.__table["ac_version"]
 
-    @autoconf.setter
-    def autoconf(self, value):
+    @ac_version.setter
+    def ac_version(self, value):
         if isinstance(value, str):
             value = float(value)
-        _type_assert_("autoconf", value, float)
+        _type_assert_("ac_version", value, float)
         if value < 2.59:
             raise _AutoconfVersionError_(2.59)
-        self.__table["autoconf"] = value
+        self.__table["ac_version"] = value
 
 
     @property
@@ -501,7 +501,7 @@
     """gnulib cached configuration"""
     _COMMENTS_ = _regex_(r"((?:(?:#)|(?:^dnl\s+)|(?:\s+dnl\s+)).*?)$")
     _AUTOCONF_ = {
-        "autoconf" : _regex_(r"AC_PREREQ\(\[(.*?)\]\)"),
+        "ac_version" : _regex_(r"AC_PREREQ\(\[(.*?)\]\)"),
         "auxdir"   : _regex_(r"AC_CONFIG_AUX_DIR\(\[(.*?)\]\)$"),
         "libtool"  : _regex_(r"A[CM]_PROG_LIBTOOL")
     }
@@ -552,10 +552,7 @@
         for (key, pattern) in Cache._AUTOCONF_.items():
             match = pattern.findall(data)
             if match and key not in explicit:
-                if key == "autoconf":
-                    self[key] = float([_ for _ in match if match][-1])
-                else:
-                    self[key] = match[-1]
+                self[key] = match[-1]
 
     def __gnulib_cache(self, explicit):
         m4_base = self.m4_base