Skip to content

Commit

Permalink
load version module in make_download
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdsa committed Jul 11, 2019
1 parent 665d654 commit 16f56cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion contrib/make_download
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 16f56cc

Please sign in to comment.