Browse Source
fix: qt icons not available when installed as python package
follow-up #5053
sqlite_db
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
4 changed files with
9 additions and
5 deletions
-
electrum/gui/icons
-
electrum/gui/qt/util.py
-
electrum/util.py
-
setup.py
|
@ -0,0 +1 @@ |
|
|
|
|
|
../../icons/ |
|
@ -797,7 +797,7 @@ def get_parent_main_window(widget): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def icon_path(icon_basename): |
|
|
def icon_path(icon_basename): |
|
|
return resource_path('icons', icon_basename) |
|
|
return resource_path('gui', 'icons', icon_basename) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@lru_cache(maxsize=1000) |
|
|
@lru_cache(maxsize=1000) |
|
|
|
@ -490,11 +490,11 @@ def user_dir(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def resource_path(*parts): |
|
|
def resource_path(*parts): |
|
|
return os.path.join(base_dir, *parts) |
|
|
return os.path.join(pkg_dir, *parts) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# absolute path to project root dir when running from source |
|
|
# absolute path to python package folder of electrum ("lib") |
|
|
base_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0] |
|
|
pkg_dir = os.path.split(os.path.realpath(__file__))[0] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_valid_email(s): |
|
|
def is_valid_email(s): |
|
|
|
@ -47,7 +47,7 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: |
|
|
usr_share = os.path.expanduser('~/.local/share') |
|
|
usr_share = os.path.expanduser('~/.local/share') |
|
|
data_files += [ |
|
|
data_files += [ |
|
|
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']), |
|
|
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']), |
|
|
(os.path.join(usr_share, icons_dirname), ['icons/electrum.png']) |
|
|
(os.path.join(usr_share, icons_dirname), ['icons/electrum.png']), |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
extras_require = { |
|
|
extras_require = { |
|
@ -79,6 +79,9 @@ setup( |
|
|
'wordlist/*.txt', |
|
|
'wordlist/*.txt', |
|
|
'locale/*/LC_MESSAGES/electrum.mo', |
|
|
'locale/*/LC_MESSAGES/electrum.mo', |
|
|
], |
|
|
], |
|
|
|
|
|
'electrum.gui': [ |
|
|
|
|
|
'icons/*', |
|
|
|
|
|
], |
|
|
}, |
|
|
}, |
|
|
scripts=['electrum/electrum'], |
|
|
scripts=['electrum/electrum'], |
|
|
data_files=data_files, |
|
|
data_files=data_files, |
|
|