commit 16f56ccbf008cdb48d3391c732c55b43db6706e9 parent 665d6540d7c5067a16071e139125ba29464346de Author: ThomasV <thomasv@electrum.org> Date: Thu, 11 Jul 2019 16:54:47 +0200 load version module in make_download Diffstat:
M | contrib/make_download | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/contrib/make_download b/contrib/make_download @@ -2,8 +2,15 @@ import re import os import sys +import importlib -from electrum.version import ELECTRUM_VERSION, APK_VERSION +# load version.py; needlessly complicated alternative to "imp.load_source": +version_spec = importlib.util.spec_from_file_location('version', 'electrum/version.py') +version_module = importlib.util.module_from_spec(version_spec) +version_spec.loader.exec_module(version_module) + +ELECTRUM_VERSION = version_module.ELECTRUM_VERSION +APK_VERSION = version_module.APK_VERSION print("version", ELECTRUM_VERSION) dirname = sys.argv[1]