Browse Source

load version module in make_download

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 6 years ago
parent
commit
16f56ccbf0
  1. 9
      contrib/make_download

9
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]

Loading…
Cancel
Save