Mercurial > gnulib
changeset 39023:cea368fdb64c
pygnulib.py: force cache invocation for some keys
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Tue, 03 Oct 2017 10:44:38 +0300 |
parents | 2e1700da900d |
children | 3cff201d38a4 |
files | pygnulib.py |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib.py Tue Oct 03 10:43:57 2017 +0300 +++ b/pygnulib.py Tue Oct 03 10:44:38 2017 +0300 @@ -62,14 +62,10 @@ def import_hook(script, gnulib, namespace, verbosity, options, *args, **kwargs): (_, _) = (args, kwargs) config = BaseConfig(**namespace) - if "ac_version" not in namespace: - configure = os.path.join(config.root, "configure.ac") - if not os.path.exists(configure): - configure = os.path.join(config.root, "configure.in") - if os.path.exists(configure): - with codecs.open(configure, "rb", "UTF-8") as stream: - match = AC_VERSION_PATTERN.findall(stream.read()) - config.ac_version = float(match[-1]) if match else 2.59 + cache = CacheConfig(configure=None) + for key in {"ac_version", "files"}: + if key not in namespace: + config[key] = cache[key] (base, full, main, final, tests) = transitive_closure(gnulib.module, config.modules, config.options) # Print some information about modules.