Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Rebrand a string in setup.py #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions electrum_nmc/gui/qt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@
from PyQt5.QtCore import QObject, pyqtSignal, QTimer
import PyQt5.QtCore as QtCore

# This trick allows accessing electrum_nmc from import statements as electrum,
# so we can avoid merge conflicts while also avoiding namespace collisions with
# upstream.
import pkgutil
import importlib
import sys
electrum_nmc = importlib.import_module('electrum_nmc')
sys.modules['electrum'] = electrum_nmc
for _, name, _ in pkgutil.iter_modules(['electrum_nmc']):
try:
m = importlib.import_module('electrum_nmc' + '.' + name)
sys.modules['electrum' + '.' + name] = m
except:
pass

from electrum.i18n import _, set_language
from electrum.plugin import run_hook
from electrum.base_wizard import GoBack
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'wordlist/*.txt',
'locale/*/LC_MESSAGES/electrum.mo',
],
'electrum.gui': [
'electrum_nmc.gui': [
'icons/*',
],
},
Expand Down